From: "Aaron Gray" <[EMAIL PROTECTED]> >> http://angray.members.beeb.net/Examples/CSS/test.html >> > >I have used extra div's instead of using padding for positioning and now >believe have a working cross browser solution. > >It would be good to know why the above example had the extra line space >though.
As was previously explained, the lack of a doctype on your page puts ALL browsers into quirks mode, which can cause quite a variety of different renderings. For IE6, it means, for one thing, that it uses the old, broken box model of its even older relatives, IE5 and IE5.5 [1]. The /real/ box model says you should add borders and padding to the outside of the content width and height. So, for example, if you have a div with a height of 40px, and a top and bottom border of 5px and top and bottom padding of 5px, you have the following addition problem that the browsers are supposed to perform. 40px (declared height) + 10px (top and bottom borders) + 10px (top and bottom padding) = 60px (total height of the div) This can also be shown as 5+5+40+5+5=60 (note: this is just a height example, but width works the same way). When IE6 is in quirks mode (which it is with your page because it has no doctype [2]) and for IE5 and IE5.5, the borders and padding are computed INSIDE the content height. So, if you set the height of your div to 40px, then the borders and padding will stay within this confined space (essentially, as long as your content doesn't make it expand). It is your choice to use a doctype or not on your pages. Just as a caution, however, as you progress with building your page. As I stated before, without a doctype, ALL browsers use their quirks rendering mode, and you will likely find that there are even more differences as you add elements to the page than just what you have found so far. Most people recommend using a valid, standard-compliance-mode-rendering doctype to be placed on page to make most browsers render things in a similar way. If you decide to keep IE6 in quirks mode for your page, you can place a comment, or an XML declaration above the doctype (if you use XHTML) to make that browser behave like its relatives, IE5 and IE5.5. There will still be many differences you will have to account for with the IEs this way, as compared to better browsers. Some people do this all the time (you know who you are...) and some, perhaps most people don't, chosing instead to keep IE6 in standard-compliance mode. I hope that helps clear things up a little for you. ~holly [1] http://www.communitymx.com/abstract.cfm?cid=E0989953B6F20B41 [2] http://www.communitymx.com/abstract.cfm?cid=E2F258C46D285FEE ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
