![]() |
[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 |
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).
|
it's not bgcolor, it's background-color
.class{ background-color: #XXXXXX; } |
Yeah, that's what I meant. Mozilla, etc, doesn't render background-color at all for div tags or table cells (or maybe not at all, haven't tested extensively)
MPEDrummer |
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. |
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 |
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 |
All times are GMT -8. The time now is 07:18 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project