Welcome to WebmasterWorld Guest from 34.235.143.190

Forum Moderators: open

Message Too Old, No Replies

Funny table column problem, why?

Affects Opera and IE sometimes...

     
10:41 am on Oct 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2003
posts:72
votes: 0


Hi, doing a website for my boss, and have a strange table effect - the table is 100% width, with 3 columns, and 3 rows, the bottom two rows are colspan=3, but on my bosses computer, in *both* IE and Opera (he's not got moz on there to test) it doesn't layout correctly... Here's the stripped down code -


<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="191" valign="top" align="left">
<a href="index.html"><img src="images/widgets.gif" alt="widgets" width="187" height="59" border="0"></a>
</td>
<td align="center">
<font size="4">Widgets</font><br>
<strong><font size="6">Widgets Info</font></strong>
</td>
<td width="191" valign="top" align="right">
<strong><a href="widgets_at_widgets.info">Email us</a><br>
Tel: 555 12345<br>
Fax: 555 12345</strong>
</td>
</tr>
<tr>
<td colspan="3" align="center">
-page-subtitle-
</td>
</tr>
<tr>
<td colspan="3" align="center">
-site-menu-
</td>
</tr>
</table>

On my computer everything looks as you'd expect it to look, but on his, the top row isn't laid out properly. The right hand cell, which hould be right/top aligned, isn't, and the center cell (between two identical width other cells) has the text to the right of center - and not by a small amount.

It should look something like -


___________________________________
¦ image ¦ Widgets ¦ link¦
¦_______¦___Widget_Info___¦____tel¦
¦_________-page-subtitle-_________¦
¦___________-site-menu-___________¦

but looks more like this -


___________________________________
¦image ¦ Widgets ¦link ¦
¦_______¦_____Widget_Info_¦tel____¦
¦_________-page-subtitle-_________¦
¦___________-site-menu-___________¦

The thing looks ok on my computer in IE and Mozilla (same version IE), not got mozilla on his, and he's got opera 7 (tried on opera 6 on this machine and it's ok here again)

Thanks in advance (hey, it's an optomistic sort of day ;-)

(edit: fixed a cut'n'paste bug)

[edited by: RobinC at 10:53 am (utc) on Oct. 16, 2003]

10:47 am on Oct 16, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 4, 2002
posts:1314
votes: 0


Validate your HTML -- you'll see you have an unclosed <tr>

Don't know if that'll fix the problem, but it's got to be a start,

10:51 am on Oct 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2003
posts:72
votes: 0


That's a cut'n'paste bug from me snipping out all the company info - the page validates locally (behind a password as it's not live so can't w3c it)

Got my boss's hopes up there - he just ran up and asked if I'd seen the reply ;-)

11:07 am on Oct 16, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 4, 2002
posts:1314
votes: 0


Looks fine on Opera 7.11 here.

Has the full HTML got a DTD for a version of HTML such that some of the table elements are invalid? Perhaps the Boss' Opera version is being extra strict.

Or maybe tell 'em to re-install.

11:25 am on Oct 16, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2003
posts:72
votes: 0


My boss found the solution (though we don't know *why*) - put the stuff into tables rather than having <br> for multiple lines... Now it's all working ok, at the expense of another couple of bytes filesize... blah ;-)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members