Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
can't have same color for background and text in css?
Old 03-26-2009, 06:43 PM can't have same color for background and text in css?
Experienced Talker

Posts: 38
Trades: 0
hi,

I've just validated my css file with w3c. no error, but with warnings.

it says i have same color for color and background-color.

but there are in different context or different divs for different pages.
does it matter?

thanks
superkingkong is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-26-2009, 07:24 PM Re: can't have same color for background and text in css?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Validation isn't the end-all-be-all. It's nice and you could probably better class/id things, but I wouldn't stress on it.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-26-2009, 11:17 PM Re: can't have same color for background and text in css?
Experienced Talker

Posts: 38
Trades: 0
Quote:
Originally Posted by JeremyMiller View Post
Validation isn't the end-all-be-all. It's nice and you could probably better class/id things, but I wouldn't stress on it.
thanks for the advice

it's like i may have black text on white background on one page, but white text on black background on another page. maybe the validator is confuse :P
superkingkong is offline
Reply With Quote
View Public Profile
 
Old 03-27-2009, 01:51 AM Re: can't have same color for background and text in css?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
It's not the validator -- it's doing it's job. It's just that you haven't totally thought out what is considered "proper" classes and ids. If you have the scenario you described, then class="black_on_white" and class="white_on_black" would be a better usage of class names and avoid the validator issues.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-27-2009, 03:35 AM Re: can't have same color for background and text in css?
Experienced Talker

Posts: 38
Trades: 0
hi,

thanks for the info. yes, i'm really new in css. Can you please explain a bit more on this issue? will renaming the class="black_on_white" and class="white_on_black" clear the validator issue?

i've a div#a {background: #000000;} to style a block on a page

and a span.black {color: #000000;font-weight: bold; } to style certain words on some pages.

now the validator is warning me on this one. black text and black background on same css but different selector

appreciate your help, thanks.
superkingkong is offline
Reply With Quote
View Public Profile
 
Old 03-27-2009, 10:49 AM Re: can't have same color for background and text in css?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Technically, you should specify a background color AND and foreground color, and that's what the validator usually gripes about - if you specify a foreground color, it wants a background color - one that would keep the text readable on top of it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-01-2009, 05:38 AM Re: can't have same color for background and text in css?
Experienced Talker

Posts: 38
Name: pravash chamling rai
Trades: 0
no worries dude !!! See ... first thing the validator is fine !!!!! It is working as it is programmer !!! For CSS level 2 having the sa,e background color and the font color will certainly give u warning !!!! well but u can save ur *** from this warning !! Just a little bit of cheating !!! when u have "#ffffff" color for background and the font, use "#ffffff" for background and "#fffffe" for font !!! The color of the font wont vary much !! Trust me !!!

Well the other thing, when u r validating your CSS try to validate it using CSS level 3. U can find it in the "more option" link in the page !! CSS 3 doesn't take it as a warning and you document will be validated with out error !!!


Hope u r clear now !!!!

Cheers !!!
mindlesswizard is offline
Reply With Quote
View Public Profile Visit mindlesswizard's homepage!
 
Old 04-01-2009, 06:09 AM Re: can't have same color for background and text in css?
Experienced Talker

Posts: 38
Trades: 0
thanks a lot for the explanation, LadynRed. i specify a background color for the span class, and the validator doesn't complain anymore

@mindlesswizard,

thanks for the idea :P
superkingkong is offline
Reply With Quote
View Public Profile
 
Old 04-01-2009, 11:55 AM Re: can't have same color for background and text in css?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
when u r validating your CSS try to validate it using CSS level 3
Pointless. CSS3 isn't even close to fully supported yet !

Quote:
Just a little bit of cheating !!! when u have "#ffffff" color for background and the font, use "#ffffff" for background and "#fffffe" for font !!! The color of the font wont vary much !!
WHY would put white text on a WHITE background ??? WHO is going to be able to read that ???? Sorry, this is a dumb idea.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2009, 05:17 AM Re: can't have same color for background and text in css?
Experienced Talker

Posts: 38
Name: pravash chamling rai
Trades: 0
I'm not explaining here about background color or font color !!! the logic is simple !!! whenever u have same color for the background or for the font CSS 2.1 alwways gives you warning !!!!

So, the alternative is to have different color value for background color n font color !!!

" CSS3 isn't even close to fully supported yet ! " LOL !!!! In which planet are u ??? I use CSS3. n it works fien with IE 6, IE 7 n firefox as well.

www.popkornmedia.com ----- Check out the top navigation here !!!! I have used the CSS3 pseudo class !!!! be smart !!!!!!!!
mindlesswizard is offline
Reply With Quote
View Public Profile Visit mindlesswizard's homepage!
 
Old 04-03-2009, 07:03 AM Re: can't have same color for background and text in css?
Super Moderator

Posts: 1,576
Location: Kokkola, Finland
Trades: 1
mindlesswizard it doesn't valdiate
http://jigsaw.w3.org/css-validator/v...rnmedia.com%2F

- be smart!!!
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 04-03-2009, 11:18 AM Re: can't have same color for background and text in css?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
In which planet are u ??? I use CSS3. n it works fien with IE 6, IE 7 n firefox as well.
Don't be rude. Perhaps you should take a look at this chart regarding css3 support : http://www.webdevout.net/browser-sup...#css3standards - from all the NOs on that chart, I have to ask which planet are YOU on ???

It is NOT fully supported by all browsers yet. To tell someone to use CSS 3 properties is not wise because it's not likely to work in every browser. CSS 3 is still just in working draft !

Oh, and enough of the !!!!!!!!!!!!!!!!!!!!!!!!! already
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2009, 11:10 PM Re: can't have same color for background and text in css?
Rad_Dev's Avatar
Experienced Talker

Posts: 37
Trades: 0
Quote:
Originally Posted by LadynRed View Post
WHY would put white text on a WHITE background ??? WHO is going to be able to read that ???? Sorry, this is a dumb idea.
Perhaps to generate higher rank by keyword spamming hidden content?
__________________
My software never has bugs... It just has random features.

Please login or register to view this content. Registration is FREE
&
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Rad_Dev is offline
Reply With Quote
View Public Profile Visit Rad_Dev's homepage!
 
Old 04-04-2009, 07:00 AM Re: can't have same color for background and text in css?
Super Moderator

Posts: 1,576
Location: Kokkola, Finland
Trades: 1
if only the above by avelpiliehicy was white text ona white background ....
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 04-05-2009, 12:49 AM Re: can't have same color for background and text in css?
Experienced Talker

Posts: 38
Name: pravash chamling rai
Trades: 0
hey "davemies" !!!

U r not getting me dude !!! I'm talking about CSS3 pseudo class !! Try validating it in CSS 3 level !! That's all !! n i am specific about the menu part !! I want you to know that, that CSS 3 works n it is useable right now !!!


Lol !!!!!

And about the white background n the white font color issue, only dumb people uses that thing !!! LOL !!!!! I think people are intelligent enough not to use the same bg color n the same font color !! aren't they ????
mindlesswizard is offline
Reply With Quote
View Public Profile Visit mindlesswizard's homepage!
 
Old 04-05-2009, 02:24 AM Re: can't have same color for background and text in css?
Super Moderator

Posts: 1,576
Location: Kokkola, Finland
Trades: 1
your css doesn't validate against the css3 spec either
http://tinyurl.com/cxd29d

whatever dude

Last edited by davemies; 04-05-2009 at 07:05 AM..
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Reply     « Reply to can't have same color for background and text in css?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46918 seconds with 12 queries