On Sep 13, 2006, at 1:40 AM, Gunlaug Sørtun wrote: > Bradley Wright wrote: >> While your solution is sound (and appropriate), I'm curious as to >> where you get the impression that browsers use "display: block;" for >> <img /> elements under any doctype--even when there isn't one. This >> has never been my experience, and I don't believe it's the case in >> the specifications, either. > > Correct. I got the differences usually seen between "standard mode" > and > "almost standard mode" in a number of browsers, mixed up with what > happened in this case - because the solution is, or can be, the same. > > In the case 'display: block' fixed (one of) IE's whitespace bugs, > and is > a sound, case-dependent, "fix". > > In other cases 'display: block' will simply solve differences seen > between the different modes - the way browsers line up images. > > I invite Philippe to forward his off-list description to the list > (so I > don't have to), to eliminate any confusion I may have introduced on > this > matter.
I have to do the copy pasting then, uhuh ? :-) Right, then. Some short notes about a behaviour that confused Georg and maybe some other people. In whatever mode: quirks mode, 'almost standard' mode (transitional doctype), standards mode (Strict doctype), images are always inline elements by default (because that is how the html4.0 describes them). But in quirks mode and 'almost standard' mode, in some cases images behave slightly differently, depending on the environment. The difference is about where the image rest. Images are treated as inline, but behave like Quirks mode does in the following case: when the image is the only element in a (pseudo)- block element, then the (fictional) baseline that may be generated is ignored. Mostly the case of images in table-cell. This may give the impression that the image is not an inline element in this case. If the image is part of a line of text (word word [image] word word), then they are 'pulled upwards' and rest on the baseline. At least that is what Gecko does. Safari behaves the same in this regard. And that is about the only reason reason why that almost standard mode was introduced. Try little files to illustrate: almost standard: <http://dev.l-c-n.com/_georg/inline-image1.html> standard: <http://dev.l-c-n.com/_georg/inline-image2.html> quirks: <http://dev.l-c-n.com/_georg/inline-image3.html> One famous article that touches on the subject: <http://developer.mozilla.org/en/docs/Images%2C_Tables% 2C_and_Mysterious_Gaps> Philippe --- Philippe Wittenbergh <http://emps.l-c-n.com> ______________________________________________________________________ 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/
