|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
W3C recommendation
The W3C warns that if a foreground color is specified, a background color should also be specified. Not doing so doesn't result in an error when running the stylesheet(s) through the CSS Validator, but it does result in a warning. Browser conflict I want my web site to (both HTML and stylesheets) to be fully W3C-compliant (not even one error or warning). Following the above W3C recommendation does make my entire site fully W3C-compliant but it also makes my site look horrid in Netscape Communicator 4.7.x (at least on Windows 98). My Question Is there a way to set the foreground color of something and set the background color to "none" or "transparent", etc? If so, then how? Thanks in advance. Last edited by macskeeball : July 9th, 2003 at 04:31 PM. |
|
#2
|
||||
|
||||
|
Yeap:
Code:
.code
{
font-family: Helvetica, sans-serif;
color: white;
font-size: 10pt;
background-color: transparent;
}
|
|
#3
|
||||
|
||||
|
On a related note, if you specify the background-color of an element and want the text color to be that of the entire site, use something like this:
Code:
body
{
background-color: white;
color: black;
}
table
{
background-color: yellow;
color: inherit;
}
|
|
#4
|
|||
|
|||
|
Good to hear. Thanks again!
![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS: Is there a "no background color" option? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|