Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 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.
mpedrummer2 is offline  
Old 02-20-2004, 07:49 PM   #2 (permalink)
Psycho
 
soopafreek's Avatar
 
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..
soopafreek is offline  
Old 02-22-2004, 01:54 AM   #3 (permalink)
Fluxing wildly...
 
MrFlux's Avatar
 
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.
MrFlux is offline  
Old 02-22-2004, 09:35 AM   #4 (permalink)
Insane
 
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
__________________
My sig can beat up your honor student.
mpedrummer2 is offline  
Old 02-22-2004, 01:11 PM   #5 (permalink)
Psycho
 
soopafreek's Avatar
 
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!!!!
soopafreek is offline  
Old 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.
mpedrummer2 is offline  
Old 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.
mpedrummer2 is offline  
 

Tags
bgcolor, browsers, css


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:55 AM.

Tilted Forum Project

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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76