More information about the Underscore mailing list

[_] DOCTYPE: Strict vs Transitional

Adam adam.bcn at gmail.com
Thu Jun 12 09:48:39 BST 2008

Hi Dan,

I think the explanation can be found in the following article:

http://www.quirksmode.org/css/quirksmode.html

*"In addition to declaring my pages XHTML 1.0 Transitional, it also triggers
almost strict mode in all browsers. ... The cause was that in strict mode <img
/> is an inline element, which means that some space should be reserved for
possible descender characters like g, j, or q. Of course an image doesn't
have descender characters, so the space was never used, but it still had to
be reserved.*

*"The solution was to explicitly declare images block level elements: img
{display: block}."*
HTH

~Adam

2008/6/12 Dan Fairs <dan.fairs at gmail.com>:

> Hi there,
>
> Being a server-oriented kind of guy, my HTML and CSS skills are
> somewhat lacking. I'm therefore a bit baffled by the following
> behaviour:
>
>   http://www.stereoplex.com/strict
>
>   http://www.stereoplex.com/transitional
>
> The only difference between the pages is the doctype - one is XHTML
> strict, the other transitional. They share the same CSS file. Leaving
> content type and 'which *should* we use?' issues aside (unless
> they're  relevant to this problem, of course!) - why is the lower bar
> below the image positioned a little further down in Strict than in
> Transitional? The behaviour exhibited by Transitional is what I'm
> after of course.
>
> Both pages validate (according to the w3c's online validator, and the
> Firefox widget thing I've got installed). I'm testing in Firefox
> 2.0.0.14 on Mac/XP and Safari 3.1.1 on the Mac.
>
> What have I done wrong?
>
> Cheers,
> Dan
>
> --
> Dan Fairs <dan.fairs at gmail.com> | http://www.stereoplex.com/
>
>
> --
> underscore_ list info/archive ->
> http://www.under-score.org.uk/mailman/listinfo/underscore
>