Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

colspan not spreading across but estreching first column - Pls Help!

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
Using PHP to render a table where data is shown summary version with option to expand a hidden row where the detail will be shown.

Here is a sample of code - Please note that for the sake of shorting the code I am excluding the detail info, instead, I simply wrote "THIS IS THE BOOK ... BUBBA ...".
Code:
<table width="600px" border="0" cellpadding="0" cellspacing="0">
<tr id="row0" style="background-color: #E6E6FA;">
<td align="center"><img src="images/arrow_down.gif" title="Click To View Vessel Information For This Origin" border="0px" onMouseOver="document.body.style.cursor='pointer';" onMouseOut="document.body.style.cursor='default';" /></td>
<td align="left">AMS&nbsp;&nbsp;</td>
<td align="right">1957&nbsp;&nbsp;</td>
<td align="right">94&nbsp;&nbsp;</td>
<td align="right">53&nbsp;&nbsp;</td>
<td align="right">13&nbsp;&nbsp;</td>
<td align="right">20.82&nbsp;&nbsp;</td>
</tr>
<tr id="ves0" style="display: block; background-color: #E6E6FA;">
<td colspan="7">
<table style="background-color: yellow; padding-left: 50px;" width="100%" border="1" cellpadding="1" cellspacing="1">
<tr><td colspan="7">THIS IS THE BOOK THAT GOT BUBBA COOKED - AND - THIS IS BUBBA!</td></tr>
</table>
</td>
</tr>
</table>

Why is the inner table not spreading across the 7 columns? I am using firefox and what I get is an inner table showing directly under the first column ...

Thank you all in advance for your help!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Hi

SouthBeach said:
Why is the inner table not spreading across the 7 columns?
Probably got confused as its parent is [tt]block[/tt] element while it expects [tt]table-row[/tt]. Remove that [tt]display: block[/tt] from the [tt]tr[/tt]'s [tt]style[/tt] and will obey.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top