|
Posted by Marc on 09/29/05 15:29
talthen.z-serwera.o2@nospam.pl wrote:
> And why in this:
>
> <hr width="80 %">
> <hr style="position: absolute; width: 80 %">
> The first line's width is 80 %, and the second is just few pixels?
I presume you're looking at this in IE? In which case, the invalid HTML
is taken as you intended it - an <hr> which is 80% the width of it's
parent tag, and the invalid CSS is taken to mean 80px, which is
obviously wrong.
I'm not sure about the first example, but certainly with the second, if
complying with the standards, the width styling should be ignored by the
browser, as the CSS is invalid.
This exactly proves the point as to why invalid CSS should be ignored -
where here you intended IE to display an <hr> of width 80% of it's
parent, you in fact got an <hr> of width 80px.
Clever IE. *pets* :P
Marc
Navigation:
[Reply to this message]
|