Forum Moderators: open

Message Too Old, No Replies

Tables in Mozilla and IE

Table compatibility in Mozilla and IE

         

mattshep58

4:11 pm on Aug 30, 2003 (gmt 0)

10+ Year Member


I have a site with a three panel table with a title, sidebar, and body.
The title is fine, so is the body, but the sidebar won't size right. I need the sidebar to be 84 pixels and the body to take the rest of the room.

Here is the code:

<table cellpadding="0" cellspacing="0" border="0"
style="text-align: left; width: 50%;">
<tbody>
<tr>
<td style="vertical-align: top;" rowspan="1" colspan="2"
bgcolor="lightblue"><img src="/title.jpg" alt="Title"
style="width: 1000px; height: 100px;" title=""></td>
</tr>
<tr>
<td background="/side.jpg"
width=84px style="vertical-align: top; height: 1000px; text-align: center;">
</td>
<td style="vertical-align: top;">

Whenever the size works for Mozilla, it doesn't work in IE6.
Is there anything I can do?

hartlandcat

8:16 pm on Aug 30, 2003 (gmt 0)

10+ Year Member



"It doesn't work in IE6" is rather vague -- what does it do?

Also, avoid using <blah style=".. -- use linked stylesheets whenever possible.

Hester

9:06 pm on Aug 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Firstly could this not be done without tables?

Secondly, this line of code appears wrong:

<td background="/side.jpg"
width=84px style="vertical-align: top; height: 1000px; text-align: center;">

The width has 'px' added and no quote marks around it. (I guess you tried it as a style first.)

Thirdly, I see what the problem is. In Mozilla, the columns are how you want them, with the side bar 84 pixels, then a wide cell to the edge of the screen. But in IE, they appear with opposite widths!

Lastly - the solution is because you haven't added a width to the last column. If I add width="926" to the cell, then IE displays it right.

mattshep58

3:55 am on Aug 31, 2003 (gmt 0)

10+ Year Member



Thank you, it works for anyone now, I never got why microsoft would make such incompatibilitys.