Div background color only showing in IE

Hi all,

I have a table which is being filled dynamically using PHP.
This is the part of the code in which the problem is;

<table style="margin-top:10px;border:1px solid;" rules="all" cellspacing="0" cellpadding="2">
<tr>
<td $style style='padding:0px;height=34px'>
<div style='background-color=".$kleur1.";height:17px;width=32px;clear:both'>
<h6 style='text-align:center;margin-top:2px;margin-bottom:2px;padding:0px;width:23px;font-size:9px'>
" . $content1 . "
</h6>
</div>
<div style='background-color=".$kleur2.";height:17px;width=32px;clear:both'>" . $content . "
</div>
</td>
</tr>
</table>

For some reason the background color only shows up IE, but not in Chrome, Firefox and Safari. However, the content of the divs show up in all those browsers.

I’ve searched the net and all i could find was something with floating divs… but i’m pretty sure that’s not my problem.

Is this just wrong code? or is IE doing something wrong (i won’t be surprised if that was the case)?

If u need more info, just ask.

Regards,

Ps. I know i should be using a stylesheet but i have my reasons not to :wink:

Hi,

We’d need to see the code from view source after the page has run and not the php. :slight_smile:

It looks as though you have invalid rules in there unless you are tidying them up before output somehow.

This is not css:


[COLOR=#000080]width=32px;[/COLOR]

It should be:


 width:32px

Wow, how could i’ve missed that :goof:
Thanks for your quick reply, it’s solved :wink: