|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
In my CSS file, I have a class defined like so:
.contrast1 { bgcolor: yellow; } I've tried adding this class to several different tags (table, tr, td, h1, p, etc.) and none of them seem to work. I'm new to CSS... The only other class I've used: .toplink { font-size: 80%; } ... works fine. Appreciate any ideas. TIA, Frank |
|
#2
|
|||
|
|||
|
use:
Code:
background: yellow; or Code:
background-color: yellow; martin. |
|
#3
|
|||
|
|||
|
background-color: yellow;
is the right way. And a note: I have had trouble with NS 4.7, using background-image in a table-cell, when I in the next cell wanted to use background-color! NS didn't show the color. The way to work around this was to use css and html: the css: .image {background-image: url("my.gif");} .noimage {background-image: none; background-color: red;} and the html: <td class="image">blablblbal</td> </tr><tr> <td class="noimage" bgcolor="red">blablblbal</td> |
|
#4
|
|||
|
|||
|
The whole problem here is when using css, you have to define background-color for the correct object.
Defining css as usual, is useless when entering into <div> <table> and form. You have to make separate style for these, if you have a table where you want to use background-color, just tell the html to do this, like this: table { background-color: #ffff00; } That should do it. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS class for bgcolor no good |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|