Forum Moderators: not2easy

Message Too Old, No Replies

validating css using w3c

validating css using w3c

         

spritch2

2:59 am on May 19, 2004 (gmt 0)

10+ Year Member



does anyone know why my css wont validate in w3c? the page has passed xhtml validation but i still get a message telling me i should be using valid html?....

To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML

Parse error - Unrecognized : <style type="text/css"> .faded{ color: #cccccc; }

<style type="text/css">

.faded{
color: #cccccc;
}
#navBar{
position: absolute;
margin: 0 0 0 -103px;
left: 50%;
top: 5px;
}

</style>

any ideas? i find it strange that even dreamweaver's css wont validate!

sim

RammsteinNicCage

3:41 am on May 19, 2004 (gmt 0)

10+ Year Member



Are you using an external stylesheet? If so, you don't need the <style type="text/css"> tag.

Jennifer

bumpaw

6:24 pm on May 19, 2004 (gmt 0)

10+ Year Member



Leave off the <style type="text/css"></style> and just send what's between them. The warning is because it doesn't know how you are using the css so it gives a caution. I tried and it shows you valid.

spritch2

11:38 pm on May 20, 2004 (gmt 0)

10+ Year Member



thanks for your time ...your suggestions seem to have sorted it out

sim