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">
<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 . "
<div style='background-color=".$kleur2.";height:17px;width=32px;clear:both'>" . $content . "

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.


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


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:


It should be:


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