Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE doesn't recognize TD width?

I wonder why IE doesn't seem to recognize the width I specify?

Basically I have this code:

<table>
   <tr>
    <td valign="top" align="right" class="left_frame"></td>
   </tr>
</table>

CSS:

.left_frame {
    background: url(images/side.gif) repeat-y; 
    width: 17px; 
}

Even if I add width="17" inside the <td></td> tags, the width still doesn't change. This is quite frustrating because the problem seems to be very simple.

like image 282
catandmouse Avatar asked Mar 11 '26 12:03

catandmouse


1 Answers

I'd say it's because there's no content in your <td>

Try adding a &nbsp; in there so the cell has some content, and see how that goes.

Alternatively, placing a height on the cell may work as well, depending on your requirements.

Basically the cell is a flat line at the moment, and needs something to tell it how tall it is, in order to draw the background in.

Example: http://jsfiddle.net/MvBf5/

like image 136
Matt Mitchell Avatar answered Mar 13 '26 03:03

Matt Mitchell