Click to See Complete Forum and Search --> : NVU w3c CSS??
xylitar
10-16-2006, 05:52 AM
hi all,
i made a site that is validated by w3c, both the html and the css..
but i had some problems with validating the css...
I used a template that was already checked by the w3c validator, and everything went well. I used NVU to make some changes in the CSS.
I was surprised to see that when i tried to validate the CSS, it came back with tons of errors.
I copy'ed the old one (original one) and tried to validate again. No problemo... I then used NVU to redo the changes in the css, and tried again...
It came back with the same tons of errors...
So in the end, i used NVU to make my htmls, and changed the css by hand.
I changed from dreamweaver to NVU because dreamweaver doesn't give you W3c compliant code. It seems that NVU gives you w3c compliant code in the (x)html's, but doesn't give you compliant css files to go with.
I suppose that the devs of NVU know that their program doesn't generate w3c compliant CSS, and i hope they fix that problem. Or am i mistaking and are the "errors" in the css things that are put in by NVU to make it compatible with ALL browsers?
Bit confused here...
greetz,
Could you provide a link to the page?
It could be that your program has some default settings to create some CSS, at the onset of any session. This initial CSS could be what is conflicting with the existing CSS in your stylesheet, thus causing the errors.
KDLA
ray326
10-16-2006, 01:39 PM
I've never cared for that editor in any of its incarnations. If you have to have WYSIWYG then try Amaya. Otherwise I'd recommend you switch to HTML-kit.
xylitar
10-17-2006, 09:35 AM
I have re-opened the good css in the css editor from NVU and it seems NVU has put the "bad" code back in.
The VNU created non w3c valid css
body { margin: 20px;
padding: 0pt;
background: rgb(255, 255, 255) none repeat scroll 0% 50%;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
color: rgb(51, 51, 51);
text-align: center;
}
#outer { border: 1px solid rgb(0, 0, 0);
margin: auto;
text-align: left;
width: 800px;
}
#hdr { background: rgb(0, 0, 0) none repeat scroll 0% 50%;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
height: 100px;
color: rgb(255, 255, 255);
}
#bar { border-style: solid;
border-color: rgb(0, 0, 0);
border-width: 1px 0pt;
background: rgb(0, 0, 0) none repeat scroll 0% 50%;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
height: 25px;
color: rgb(255, 255, 255);
}
#bodyblock { padding: 0pt;
background: rgb(168, 192, 242) url(file:///S:/Business/EXC/Management/Marketing/Expert%20Consulting%20Website/img/kader/menu_background.jpg) repeat-y scroll left top;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
position: relative;
color: rgb(255, 255, 255);
width: 800px;
}
#l-col { background: transparent none repeat scroll 0% 50%;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
float: left;
color: rgb(0, 0, 0);
width: 145px;
}
#cont { border-style: solid;
border-color: rgb(0, 0, 0);
border-width: 0pt 0pt 0pt 1px;
background: rgb(255, 255, 255) none repeat scroll 0% 50%;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
width: 650px;
color: rgb(51, 51, 51);
text-align: left;
}
#ftr { border-style: solid;
border-color: black;
border-width: 1px 0pt 0pt;
margin: 0pt;
background: rgb(0, 0, 0) none repeat scroll 0% 50%;
-moz-background-clip: initial;
-moz-background-origin: initial;
-moz-background-inline-policy: initial;
height: 25px;
color: rgb(51, 51, 51);
}
The validator seemed to give errors on the -MOZ- lines.. I guess it is inserted for mozilla, but then i can't understand why it is not w3c?
anyway, the problem is solved as i (like i posted first) edited the css by hand. and is now completely validated. But is there someone that can tell me where those -Moz- lines come from and why they are inserted?
felgall
10-17-2006, 03:23 PM
The validator is supposed to ignore attributes that start with -moz- or -khtml- as that is supposed to be the standard way of differentiating between browser proprietary attributes and standard attributes. It is only IE proprietary attributes which don't prepend -ie- on the names that should be considered non-standard and give errors.
Those codes would be there for old versions of Mozilla from before the standards were extended to cover those attributes. As the current versions of Mozilla based browsers all understand the current version it should be safe to delete all of the -moz- attributes.
xylitar
10-18-2006, 02:14 AM
The validator is supposed to ignore attributes that start with -moz- or -khtml- as that is supposed to be the standard way of differentiating between browser proprietary attributes and standard attributes. It is only IE proprietary attributes which don't prepend -ie- on the names that should be considered non-standard and give errors.
Those codes would be there for old versions of Mozilla from before the standards were extended to cover those attributes. As the current versions of Mozilla based browsers all understand the current version it should be safe to delete all of the -moz- attributes.
thank you for clearing that up for me, felgal...
If the validator shouldn't give errors on -Moz- "atribs" i'm surprised, it did return an error for every -Moz- that was in my css. But at least now i am sure i can delete those lines without second thought.
big thumbs up.... :D