Forum Moderators: open

Message Too Old, No Replies

Background color doesn't show in Firefox

         

Tijmen

6:38 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



Hi,

I have got the following code to display a table with a light grey background. This works fine in IE, but the background remains white in Firefox. Does anybody know how to fix this?

<table width="760" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="F2F2F2">

encyclo

6:41 pm on Apr 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], Tijmen.

There is a slight error in your markup, and Firefox is less forgiving than Internet Explorer. You are missing the "#" character before the color definition:

<table width="760" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="[b]#[/b]F2F2F2">

That should fix it!

tedster

6:44 pm on Apr 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, Tijmen.

Hex colors need to be preceeded by the hex symbol (#) to be valid. So bgcolor="#F2F2F2"> will work in Firefox and all other browsers too.

Tijmen

7:22 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



It looks a lot better now ;-)

Thanks...