DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Design

Reply
 
Thread Tools Display Modes
Old 01-28-2006, 12:23 PM   #1
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default W3C CSS validator questions

Our home page here validates as valid XHTML Strict and its style sheet also validates. However, I get several warnings that I am not sure I understand:

  • Line : 5 (Level : 1)
    You have no color with your background-color : body

  • Line : 5 (Level : 2)
    Redefinition of background-color : body

  • Line : 41 (Level : 2)
    You have some absolute and relative lengths in padding. This is not a robust style sheet.

  • Line : 56 (Level : 2)
    You have some absolute and relative lengths in padding. This is not a robust style sheet.
What should I do about the first two? Is it that I am not supposed to set background-color in body in the first place? What color would I set there? Inherit? From where? Redefine?

As for the other two, I have never heard it was not robust to use different sorts of values (i.e., em and %) before. How does that weaken the stylesheet?

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 01-28-2006, 12:37 PM   #2
annc
Sysop
 
annc's Avatar
 
Join Date: Oct 2004
Location: Subtropical Queensland, Australia, between the mountains and the Coral Sea
Posts: 4,436
Default

Dunno about the second two, but can see the problem with the first two:

You have defined the background-color twice: transparent, and white. I'd remove the transparent defintion if you want it to be white.

Having done this, you can use background-color: inherit elsewhere to avoid nasty surprises in coloured boxes etc.

The other warning come back to the one I was complaining about recently, that since they introduced the warnings, they seem to require a text colour and a background colour for everything. If you add:

color: #000;

Then the second warning will go away.

   
__________________
annc is offline   Reply With Quote
Old 01-28-2006, 12:55 PM   #3
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

Quote:
Originally Posted by annc
You have defined the background-color twice: transparent, and white. I'd remove the transparent defintion if you want it to be white.

… they seem to require a text colour and a background colour for everything. If you add: color: #000; [to body] Then the second warning will go away.
Ahhh. I have been using background: transparent for body since I first started using stylesheets, based on something I read. Took it out and added color: #000000; and now both warnings have stopped.

As for the use of different value types, maybe someone else will advise on that.

Whew. Thanks.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 01-28-2006, 01:45 PM   #4
annc
Sysop
 
annc's Avatar
 
Join Date: Oct 2004
Location: Subtropical Queensland, Australia, between the mountains and the Coral Sea
Posts: 4,436
Default

Quote:
Originally Posted by ktinkel
As for the use of different value types, maybe someone else will advise on that.
Yes, I'd be interested to hear about that, too.

   
__________________
annc is offline   Reply With Quote
Old 01-28-2006, 03:20 PM   #5
George
Member
 
George's Avatar
 
Join Date: Feb 2005
Posts: 1,036
Default

Quote:
Originally Posted by ktinkel
Our home page here validates as valid XHTML Strict and its style sheet also validates. However, I get several warnings that I am not sure I understand:


  • Line : 5 (Level : 1)

    You have no color with your background-color : body



  • Line : 5 (Level : 2)

    Redefinition of background-color : body



  • Line : 41 (Level : 2)

    You have some absolute and relative lengths in padding. This is not a robust style sheet.



  • Line : 56 (Level : 2)

    You have some absolute and relative lengths in padding. This is not a robust style sheet.
What should I do about the first two? Is it that I am not supposed to set background-color in body in the first place? What color would I set there? Inherit? From where? Redefine?

As for the other two, I have never heard it was not robust to use different sorts of values (i.e., em and %) before. How does that weaken the stylesheet?


I recently encountered the exact same assessments and asked myself these questions. Finally, I decided it just doesn't matter. And, so far as I can tell, it really doesn't. There are rules and there is reality.



Regards,



George
George is offline   Reply With Quote
Old 01-28-2006, 05:43 PM   #6
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

Quote:
Originally Posted by George
I recently encountered the exact same assessments and asked myself these questions. Finally, I decided it just doesn't matter. And, so far as I can tell, it really doesn't. There are rules and there is reality.
I guess. It isn’t that I aspire to perfection or anything like it (far be it!), but I would like to understand the messages!

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 01-28-2006, 11:26 PM   #7
Ian Petersen
Staff
 
Join Date: Nov 2004
Posts: 235
Default

Quote:
You have no color with your background-color
It's generally regarded as good form to define both foreground and background colours so as to avoid any mishaps if the stylesheet gets cascaded with another stylesheet that redefines one or the other colours making the text invisible.
Quote:
You have some absolute and relative lengths in padding.
Bad things can happen if you mix pixels and percentages on the same object in the same direction. They won't scale uniformly in most browsers.

   
__________________
Ian
Ian Petersen is offline   Reply With Quote
Old 01-29-2006, 01:24 AM   #8
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

Quote:
Originally Posted by George
I recently encountered the exact same assessments and asked myself these questions. Finally, I decided it just doesn't matter. And, so far as I can tell, it really doesn't. There are rules and there is reality.
These are warnings - if they were about rules, they would be reported as errors. The warnings usually indicate potential problems with scaling (mixing units can cause problems there, or cause totally different layout in different browsers) or with accessibility (not defining both foreground and background color can lead to illegible text). Both of those problems are very much part of reality - but of course you you are free to ignore that bit of reality.

For a forum about desktop publishing and web development it would be wise not to ignore such warnings, which is why we have this thread!

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Old 01-29-2006, 05:31 AM   #9
George
Member
 
George's Avatar
 
Join Date: Feb 2005
Posts: 1,036
Default

Quote:
Originally Posted by iamback
These are warnings - if they were about rules, they would be reported as errors. The warnings usually indicate potential problems with scaling (mixing units can cause problems there, or cause totally different layout in different browsers) or with accessibility (not defining both foreground and background color can lead to illegible text). Both of those problems are very much part of reality - but of course you you are free to ignore that bit of reality.

For a forum about desktop publishing and web development it would be wise not to ignore such warnings, which is why we have this thread!
I've gotten away quite nicely with ignoring this part of what is called reality, (the rules on the warnings, that is) and expressing that point of view is why I participated in the thread. Wisdom is a rather relative concept, I guess.

Regards,

George
George is offline   Reply With Quote
Old 01-29-2006, 07:23 AM   #10
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

Quote:
Originally Posted by iamback
The warnings usually indicate potential problems with scaling (mixing units can cause problems there, or cause totally different layout in different browsers) …
I wish I could understand that. I often use ems for vertical spacing (distance from top of the window or below the logo, etc. to the text) and % for major horizontal units (outer margins, element widths, gutters between elements).

I have been scratching my head about how that could cause a scaling problem, and while anything may look different from one browser to another, I haven’t seen anything that could be attributed to that particular approach.

Perhaps I am too inexperienced! Once I have seen it all, then …

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FF & IE questions... terrie Web Site Building & Maintenance 8 09-07-2006 01:29 PM
CSS validator warning dthomsen8 Web Site Building & Maintenance 4 03-19-2006 01:04 PM
More ID Questions BobRoosth Print Design 19 10-20-2005 05:30 PM
ID Questions BobRoosth Print Design 4 09-29-2005 06:37 AM


All times are GMT -8. The time now is 07:30 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.