Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
can't get the table right
Old 09-09-2003, 05:52 AM can't get the table right
Novice Talker

Posts: 5
Trades: 0
I'm trying to make a small table with 2 rows and 3 columns.
I want the first and third columns to be small columns and the second column, the middle column, to take up all the space in between. I do this by setting a specified table width, then specifing widths on columns 1 and 3, and then not specifing a width for the second (middle) column.

This seems to work, until I make the second row. It spans all 3 columns (colspan=3). When a few letters are written in this cell, the table stays fine, but when text (or an image) reaches the middle of the table, the cells in the first row get all out of whack. Why does it do this?

Thanks for reading, and hopefully helping... - Jesse

Oh, here's some code: (table looks fine unless the colspan=3 column has lots of text in it)

<html>
<body>

<table width=200 border=1 cellpadding=0 cellspacing=0 bordercolor=black>

<tr height=50>
<td width=50>&nbsp;</td>
<td>&nbsp;</td>
<td width=50> &nbsp;</td>
</tr>
<tr height=50>
<td colspan=3 align=center>&nbsp;</td>
</tr>
</table>

</body>
</html>
kintantee is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-09-2003, 06:56 AM
The Crow's Avatar
SHOW

Posts: 1,521
Location: USA
Trades: 0
try this
http://thecrowshow.com/paste/program-files/table.html
The Crow is offline
Reply With Quote
View Public Profile
 
Old 09-09-2003, 12:41 PM
Novice Talker

Posts: 5
Trades: 0
My problem is that I eventually want the whole table width set at 100% of window width, that way the side columns are fixed and the middle column fills the rest of the space in the browser window. But I can't get this simple example to work!
kintantee is offline
Reply With Quote
View Public Profile
 
Old 09-09-2003, 01:36 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
This seems to work for me:
Code:
<table width="100%" border="0" cellpadding="1">
  <tr> 
    <td width="50">&nbsp;</td>
    <td>
	&nbsp;
</td>
    <td width="50">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3">&nbsp;</td>
  </tr>
</table>
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 09-09-2003, 02:45 PM
Novice Talker

Posts: 5
Trades: 0
sure that works fine, but turn the border on and start putting a whole bunch of text in the colspan=3 row. If I type enough characters to fill about half the cell, the row above starts to screw up. Why is that?
kintantee is offline
Reply With Quote
View Public Profile
 
Old 09-09-2003, 08:53 PM
Novice Talker

Posts: 5
Trades: 0
here's an interesting bit. This works:

<tr height=50>
<td width=50>&nbsp;</td>
<td>&nbsp;</td>
<td width=50> &nbsp;</td>
</tr>
<tr height=50>
<td colspan=3><img src="images/spda_title.gif" height=50 width=114></td>
</tr>
</table>

but changing the img width to 115 or anything higher makes row 1 go nuts! (nuts=bad) What's the deal?
kintantee is offline
Reply With Quote
View Public Profile
 
Old 09-09-2003, 08:55 PM
Novice Talker

Posts: 5
Trades: 0
oops, forgot... the first line is:
<table width=100% border=1 cellpadding=0 cellspacing=0 bordercolor=black>
kintantee is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to can't get the table right
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18363 seconds with 12 queries