Forum Moderators: not2easy
I have created a site page which is a valid XHTML now.
But when i try to validate the CSS is says the following error
Value Error : height only 0 can be a length. You must put an unit after your number : 18
This is the CSS I have written
#header-div
{
position:absolute;
width: 934px;
left: 34px;
height:18;
}
I have 8 errors in the CSS and it seems that this is the only error i get..
Then I tried putting px after the number 18. Like this
#header-div
{
position:absolute;
width: 934px;
left: 34px;
height:18px;
}
Still the problem exists
I dont understand what the problem is.
Can someone please help me
Thank you for your time
[jigsaw.w3.org...]
validates
#header-div
{
position:absolute;
width: 934px;
left: 34px;
height:18px;
}
...
What wrgvt was saying though, is that when you absolute position something, you should generally specify at least a top (and/or bottom) and a left (and/or right). Sitenote: IE6 does not support cumulative use of top with bottom nor left with right (which is why absolute positioning designs are not really used, among other reasons), but that is not relevant to your problem.
I doubt it's the case, because someone said that code snippet validates, but he was suggestion you give a "top" offset, just like you gave a "left", because you typically should use both.
[edited by: Xapti at 11:48 pm (utc) on April 17, 2008]