Forum Moderators: open

Message Too Old, No Replies

problem with width attribute in IE, ok in FF, Netscape and Opera

         

kigoobe

8:34 am on Apr 7, 2007 (gmt 0)

10+ Year Member



Well guys

I have a code like this -


<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#F0EEEF">
<tr>
<td width="201" style="width:201px;" valign="top">
<img src="img/spacer.gif" width="201" style="width:201px;" height="1" />
<? include 'leftmenu.php';?>
</td>
<td valign="top" width="*">
<div class="middleb">
<div class="insidebody">
<table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
<tr>
<td>
<!-- content goes here //-->
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>

Problem is, the second td that includes the two divs and then the content, do not appear properly in IE. In FF, Netscape and Opera, they are appearing as they should, that is, is getting stretched taking the full screen. And the first td is taking 201 px as told.

In IE, the first td, that should take 201 px, is taking 50% of the screen width, and the other td that should take 100% of screen width - 201px, is taking the rest 50% of the screen width. A bit weird, I am searching different forums, googling, but could not get a solution yet. Any help?

My doctype is -

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

[edited by: kigoobe at 8:40 am (utc) on April 7, 2007]

kigoobe

8:37 am on Apr 7, 2007 (gmt 0)

10+ Year Member



Note:

This works fine if I change the line

<td valign="top" width="*">
to
<td valign="top" width="100%">
, but then I get a big horizontal scroll in smaller resolutions, like 800 x 600