problem with css

T

Thomas Müller

Hello,

the following HTML works:

<td bgcolor="C00000">Test</td>

the following doesn't work:

<td class="BG">Test</td>

in the styles.css is BG defined:

.BG { bgcolor: C00000 }

what's my fault?

Thanks in advance,

Tom
 
S

scripts.contact

Hello,

the following HTML works:
<td bgcolor="C00000">Test</td>

the following doesn't work:
<td class="BG">Test</td>

in the styles.css is BG defined:
.BG { bgcolor: C00000 }

BGCOLOR is a HTML attribute not CSS. In CSS, use-
background-color:xxxxxx
 
S

scripts.contact

Correction: background-color: #xxxxxx
^
Put '#' before the 'C00000'

yes, i forgot that...
and color names are also valid like-
red,black,lime,green etc.
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

Thomas Müller wrote :
Hello,

the following HTML works:

<td bgcolor="C00000">Test</td>

the following doesn't work:

<td class="BG">Test</td>

in the styles.css is BG defined:

.BG { bgcolor: C00000 }

what's my fault?

Thanks in advance,

Tom

This particular issue and many others are explained, addressed at

Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages

Gérard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top