I mean- the number of spaces differ between : and 3, I also can write
"width:3" and it will work.
So where's the logic- sometimes spaces are ingored, sometimes not?
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?
Regards,
Talthen
Because as I wrote elsewhere inthis thread:
Remember this is a property value, not a description, the property like
the values are one word entities: it's 'background-color' not
'background color', right? This is a 'script' to be evaluated by a
program, your browser, not a human.
I gather regular expressions are used to parse the properties and values.
':' separates the property for the value or values
'whitespace' separates the property values
';' separates the properties and values pairs
If you put a whitespace between the value’s value and the value’s units
specifier the parser would be confused as two as separate property values
read the spec:
http://www.w3.org/TR/CSS21/syndata.html
To understand this you have to think like software not as a human.
Humans can usually makes sense out of with ambiguous, incomplete or
erroneous data, computers do not. When a program tries to out-guess the
data, well MS keeps trying ;-) Try entering a list of names in a Excel
SS column in this order "Mary Jane", "Mary Jo", "Mary"...