confused - html validates, css validates but validate css from the html causes errors

  • Thread starter Titus A Ducksass - AKA broken-record
  • Start date
T

Titus A Ducksass - AKA broken-record

If you want to see the actual code, I would have to set up a dummy
site with the logo doctored to hide the organisation.

HTML Validates
w3c html validator http://validator.w3.org/ says
This Page Is Valid HTML 4.01 Transitional!

CSS Validates (second link from html validator)
w3c css validator http://jigsaw.w3.org/css-validator/ says
Congratulations! This document validates as CSS!
Warnings URI :(link zapped)
Line : 0 font-family: You are encouraged to offer a
generic family as a last alternative

CSS does not validate (First link from html validator)
http://jigsaw.w3.org/css-validator/validator?uri=(link zapped) says
Errors
URI : (link zapped)
Line: 14 Property layer-background-color doesn't exist : #66bad4

Line: 32 Property layer-background-color doesn't exist : #66bad4

Warnings
URI : (link zapped) Line : 0 font-family: You are encouraged to
offer a generic family as a last alternative

The colour in lines 14 and 32 is a mucky pale blue set by Dreamweaver
colour picker from our logo.

A sample of the css is:
.mbutton {
font-family : Arial, Helvetica, sans-serif;
font-style : normal;
font-weight : bold;
color : #ffffff;
text-decoration : none;
text-align : center;
vertical-align : middle;

Using Bobby http://bobby.watchfire.com/bobby/html/en/index.jsp
& WebXact http://webxact.watchfire.com/ the pages pass all the
automatic validations to AAA or priority 3 whichever way you count.
(I will never put the above on any of my pages as the moment I do will
be the moment I break it).

<A message to top posters. Type your reply here>
 
B

brucie

In alt.html Titus A Ducksass - AKA broken-record said:
If you want to see the actual code, I would have to set up a dummy
site with the logo doctored to hide the organisation.

good idea
Line : 0 font-family: You are encouraged to offer a
generic family as a last alternative

15.2.6 Generic font families
http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families

if you just specify a generic family (e.g. font-family:sans-serif;)
rather than a specific font name the visitor gets their preferred font
for that family and you get to keep the look you want. everyone's
giggly.
Line: 14 Property layer-background-color doesn't exist : #66bad4

just what it says. layer isn't even a html element.

· bobby cant even correctly parse a valid html document so don't take
what it says as gospel.

· design your site to be accessible not to appease a program or list of
checkpoints. they're not the same thing and sometimes conflict.

· if you come across a site claiming 'AAA' you know its been designed to
satisfy a checklist, not for the disabled visitor.

· you can guess but cant claim the site is accessible until its tested
by the disabled.

Accessibility checking - can programs do it? (not really)
http://www.cs.tut.fi/~jkorpela/www/acctools.html
 
A

Andy Dingley

If you want to see the actual code, I would have to set up a dummy
site with the logo doctored to hide the organisation.

If you want us to _fix_ the actual code for you, then you will have to
let us see it.
Line: 14 Property layer-background-color doesn't exist : #66bad4

Look for an attempt to set the background-color in your CSS, and a
word "layer" somewhere nearby, and a subtle syntax error that is
causing them to be concatenated.
 
S

Steve Pugh

Look for an attempt to set the background-color in your CSS, and a
word "layer" somewhere nearby, and a subtle syntax error that is
causing them to be concatenated.

No. Netscape 4 supported a custom CSS property called
layer-background-color which set the background colour for positioned
elements. The difference between layer-background-color and
background-color was teh layer-background-color created a background
that went all the way to the border whilst background-color left a
transparent gap just inside the border.

So back in 1998 there was reason to use layer-background-color to
create cross-browser conformity of presentation. But not in 2004.

Steve
 
T

Titus A Ducksass - AKA broken-record

No. Netscape 4 supported a custom CSS property called
layer-background-color which set the background colour for positioned
elements. The difference between layer-background-color and
background-color was teh layer-background-color created a background
that went all the way to the border whilst background-color left a
transparent gap just inside the border.

So back in 1998 there was reason to use layer-background-color to
create cross-browser conformity of presentation. But not in 2004.

Steve

This is part of the offending line - as created by Dreamweaver MX (not
2004)

<div id="menu" style="position:absolute; z-index:2; top: 10px; left:
10px; background-color: #66BAD4; layer-background-color: #66BAD4;
border: 1px none #000000;">

I will test from work tomorrow without the layer-background-color:
#66BAD4; - I hadn't actually noticed it had been used twice in there.

<A message to top posters. Type your reply here>
 
A

Andy Dingley

This is part of the offending line - as created by Dreamweaver MX (not
2004)

<div id="menu" style="position:absolute; z-index:2; top: 10px; left:
10px; background-color: #66BAD4; layer-background-color: #66BAD4;
border: 1px none #000000;">

So why the hell couldn't you sort this out yourself from the very
obvious error message you were given ? And why expect other people
to play twenty questions on code we can't even see ?

<plonk>
 
T

Titus A Ducksass - AKA broken-record

So why the hell couldn't you sort this out yourself from the very
obvious error message you were given ? And why expect other people
to play twenty questions on code we can't even see ?

<plonk>
Because it never occurred to me that the code was wrong.
The code validated until I validated the CSS which made me think there
was a problem with the CSS.

<A message to top posters. Type your reply here>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top