Fu Ni T'hat wrote:
> Stuart King wrote:
> Someone else can explain why ... I don't quite understand it myself.
> But if you use: <p class="pEM">
> instead of: <p><span class="pEm">
> it will work. Same is true of other class.
> Funny, that.
Yes, but quite logical... :-)
The solution given above is fine, and seems to work as intended. The
divs that are used in that page now might not be the most
logical/semantical element to use for text, but that's another matter.
The reason is that a span is an inline-element by default, while a p is
a block-element. A div is also a block-element, and some of those '.pEM'
styles only apply to block-elements and will be ignored on inline-elements.
This means that if a span has the style 'display: block' set on it, the
other styles are supposed to work on that element too - regardless of
its default. Might be needed at times, but not here.
CSS is fun - most of the time ;-)
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/