Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page layout getting messed up

Status
Not open for further replies.

SlykFX

Programmer
Oct 12, 2002
76
GB
im uysing a table to layout my page as i want things to originate from the center of the screen, im using an external css to setup the tables and everything

the page is displaying perfect until i put the doctype declaration in then the whole layout gets messed up

its as though it is affecting the height attributes for the tables

does any one know of a solution to this or is there a work around (other than excluding the doctype?)

I can't be bothered to have a sig!
 
but is there an actual fix for it or not?

I can't be bothered to have a sig!
 
IE6 will follow 'strict mode' when you use a DocType (which is supposedly 'standards compliant'). When you don't use a DocType IE6 will use 'quirks mode' which is a similar rendering model to IE5.

The solution is to put a comment before the DTD - IE will stay in quirks mode - giving you the rendering you want - without compromising the code quality. If you're using XHTML, an xml declaration before the DTD will have the same effect.


A WARNING - if IE only renders when it's in quirks mode, your page probably doesn't render properly on Standards-based browsers. Test your page with something like Mozilla.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top