Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [CSS(?)] bgcolor and browsers (https://thetfp.com/tfp/tilted-technology/46386-css-bgcolor-browsers.html)

mpedrummer2 02-20-2004 06:31 PM

[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

soopafreek 02-20-2004 07:49 PM

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).

MrFlux 02-22-2004 01:54 AM

it's not bgcolor, it's background-color
.class{
background-color: #XXXXXX;
}

mpedrummer2 02-22-2004 09:35 AM

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

soopafreek 02-22-2004 01:11 PM

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.

mpedrummer2 02-22-2004 06:47 PM

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

mpedrummer2 02-23-2004 12:25 PM

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 02:42 AM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43