02-20-2004, 06:31 PM | #1 (permalink) |
Insane
|
[CSS(?)] bgcolor and browsers
Sigh. Time to fix some shitty code, but I need some help here.
I wrote a little PHP/MySQL app to monitor service calls for my company. It, in turn, generates these cute little reports for management, etc, that are color-coded. I just use CSS, class="whatever" and then those class definitions have bgcolor defined in them. Works just fine in IE. However, the company has (wisely) decided that IE is not necessarily the be-all-end-all browser, and they're playing with Firefox. I must say, I dig Firefox, but here's the problem...Firefox doesn't support bgcolor in CSS. So...I need a way to make an area (formerly defined by a div) be a different color. The area contains a few tables, and I have been able to get them colored the way I want, but it's not the same effect...the old way, all the space was uniformly filled, regardless of how much of the space was used. If I make the table fixed width, the content gets really spread out and crappy. So, who has an idea? Any suggestions are welcome and appreciated. MPEDrummer
__________________
My sig can beat up your honor student. |
02-20-2004, 07:49 PM | #2 (permalink) |
Psycho
Location: ask your mom
|
if you're using css to color the div or table cell, use "background: #xxxxxx" in the style sheet. that should work. (the x's would represent hexidecimal coloring, which can be replaced with RGB values, or supported colornames).
__________________
aaarrrrrgggghhhh!!!! Last edited by soopafreek; 02-21-2004 at 11:59 AM.. |
02-22-2004, 01:54 AM | #3 (permalink) |
Fluxing wildly...
Location: Auckland, New Zealand
|
it's not bgcolor, it's background-color
.class{ background-color: #XXXXXX; }
__________________
flux (n.) Medicine. The discharge of large quantities of fluid material from the body, especially the discharge of watery feces from the intestines. |
02-22-2004, 01:11 PM | #5 (permalink) |
Psycho
Location: ask your mom
|
mozilla does. if you're using stylesheets, "background-color" or the shorthand version "background" definitely work. if you're trying to code it inline to your html tags (ie, < td bgcolor=.... >, then maybe not... or just be sure to use < tag style=" (then insert css code here) " >. maybe check to see you didn't mistype? or try validating your css.
get firefox's web developer toolbar. it should help you out quite a bit.
__________________
aaarrrrrgggghhhh!!!! |
02-22-2004, 06:47 PM | #6 (permalink) |
Insane
|
Hmm...then something's definately jacked up.
If I do <tr bgcolor="#cccccc">, it works in Firefox and IE. If I do <td bgcolor="#cccccc">, it doesn't render in Firefox, but still works in IE. There's gotta be a difference in something I'm doing....grr... Thanks for the help thus far! MPEDrummer
__________________
My sig can beat up your honor student. |
02-23-2004, 12:25 PM | #7 (permalink) |
Insane
|
GOT IT!!
K, here's the dilly... IE, etc, supports nested classes - ".class.subclass" - this works fine in IE. However, this does NOT work AT ALL in Firefox...or maybe my nesting is fucked up. Either way, it works now. Thanks guys/gals! MPEDrummer
__________________
My sig can beat up your honor student. |
Tags |
bgcolor, browsers, css |
|
|