icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old September 18th, 2005, 9:13 PM   #1 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
Cool CSS Validator Changes

Whoa, I was just running a quick validation check on the CSS I whipped up for my new webby and I just about fell off my chair.

For one, line-height: 0; is now considered an error...I don't even know how that ended up in there (I think I accidently C&Ped it from an old CSS but have since stopped needing it). And while they aren't errors, it does spit out a warning for any place you don't define both color and background-color. I use a a few background images, so defining a color would in effect obscure them...so let's just say there were a LOT of warnings.

Oiy.
ceo is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 18th, 2005, 9:21 PM   #2 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,084 posts
Gave thanks: 48
Thanked 131 times
Yep.. I ran into that myself... There's a million warnings now, but fortunately they're fairly simple to fix. There's a really good reasoning behind it, which is more about generosity than anything. A rule of thumb is that whenever you set one color (background or fore) you set the other.

A warning does not mean your code is invalid, but it's something to consider in order to provide the best viewing support for your visitors. It ensures that colors will get passed to the browser properly, which is good to use if you rely on background images. Trust me, your background image *should* show over the color.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 18th, 2005, 9:55 PM   #3 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
I'm not that far gone, Mike. I know that if you define a color and an image, the image goes over it. I should have been more precise when I was writing above and explain there were divs over the existing defined backgrounds and such so they were sort of causing a tad of insanity with the validator wanting everything defined.

it's my own fault for not being more diligent with defining both, since you really should. But meh. I went through and cleaned it all up and now it is quite spiffery to look at.
ceo is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 18th, 2005, 10:58 PM   #4 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
a good way to be 'lazy' with background-color: and color: is just set the background-color: transparent;
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 18th, 2005, 11:01 PM   #5 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
Depending on how your stylesheet is, the validator still picks that up as a warning.
ceo is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 23rd, 2005, 6:00 PM   #6 (permalink)
SurPerson
On a golden path...
 
TJ09's Avatar
 
Joined in Jul 2004
Lives in front of my laptop
Hosted on Sync
437 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
The validator keeps on adding stuff like #autoXML781424781424
and then says it's producing warnings, when it's not there in the first place.
__________________
Me: TeeJay
Server: Sync (Statistics)
Site: technoized.com (Statistics)

chown -R us ./base
TJ09 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On