• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Using CSS and RGB colors....

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

TheFrag

Member
Joined
Aug 8, 2002
ok, I guess Mozilla Firebird doesnt like CSS (at least ilnline- havent tried linking) nor using an RGB color. Anyone else have this problem? Is there a way to do it in Netscape explorers/Mozilla? Or is my version just outdated?
Thanks.
 
If you're really using Firebird, try updating to Firefox (0.8). I haven't tested inline CSS, but linked works fine right down to RGB colors :)

JigPu
 
does
Code:
<body bgcolor="rgb(XXX, XXX, XXX)">
work in it do ya know? Ill go download it right now....
 
I just threw it in a quick page, and while it worked, it didn't work correctly. :(

The image below has two DIVs of different color specified with a linked sheet (I was already using the page for something), and I added in the bgColor inline. I took out the link to the stylesheet and the DIVs, and it didn't fix the problem either. Looks like FireFox has some issues with correct RGB color :(

css.jpg


JigPu
 
Yep :/ Im trying to get a particular shade of grey It shows up perfect in IE, but it is a dark green in Firefox. How do I found out the hex values of a color?
Thanks.
 
Open calculator, and make sure it's in Scientific mode. Type in the first RGB number. Change the mode from 'Dec' to 'Hex' (located top left, just below the result area). The number is automatically converted from decimal to hex.

Do this for the 2nd and 3rd numbers as well. Put the hex into one big string, and add a '#' before it. You've now got a hex color :)


EXAMPLE:
rgb(15, 164, 88)
15 -> 0F (note that calculator will only show "F". All color values are two hex digits long, so add in the assumed zero)
164 -> A4
88 -> 58

Hex color: #0FA458

JigPu
 
I've found that mozilla based browsers seem to handle CSS just fine when it's done properly, but that IE handles it well even when you've made mistakes in the coding.

Don't know if that's the case here or not, but I was very confused when I started doing this:

<img src="image.jpg" style="position=absolute;left=45;top=345"> and it worked fine in IE, but wouldn't work in firebird/netscape/mozilla, because i used an = instead of a :.

I've never tried using the RGB(r,g,b) before, but check your syntax to make sure it's 100% correct, by W3C standards. That may be the whole problem.
 
Back