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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Offset Layers in Internet Explorer

DreamWeaver 101

Offset Layers in Internet Explorer

by  CTekMedia  Posted    (Edited  )
Your page displays differently in IE than in Mozilla or another CSS compliant browser - your layers are offset and not quite the same size. What is even more frustrating is that the page looks good in Dreamweaver.

The most likely problem is that IE is rendering the page in QUIRKS MODE. IE has two modes QUIRKS and Compliance. Quirks mode shows pages as they would be seen in older browsers that had buggy CSS support (Like Netscape 4). Compliance mode renders the page according to (fairly) strict W3C specs.

Pages that use older DOCTYPEs, are incorrectly formed, or have no DOCTYPE, display in the QUIRKS mode.

Also the DOCTYPE statement must be the first line of code. Even a blank line will cause IE to go to QUIRKS mode.

Sample DOCTYPE statement:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">

Replace your old DOCTYPE with a correct strict statement and your display in Dreamweaver will render correctly which will then allow you to easily make the page such that it will look the same in most recent browsers.

The disadvantage of writing compliant pages is that older browsers won't render pages correctly so you will have to use CSS hacks or alternate pages for those users. Since most users are now on IE 6 or Firefox I let users of older browsers suffer - unless it is an important site or the client wants to pay for the extra work.

List of related DOCTYPES and related info:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

W3C standards validation - Check your site:
http://validator.w3.org/
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top