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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Table

Status
Not open for further replies.

mtullydives

Programmer
May 16, 2003
4
PE
Hello, I am trying to create a 2 row 2 column table with the first row, first column set to about 15 pixels. The second column needs to span the 2 rows. When I do this the first row, first column does not stay at 15 pixels when I add text to the second column. This is causing me a problem. How do I get the first row, first column cell to STAY at 15 pixels?

I have tried to set the height exclusively, and that does not work.

Any ideas?
 
<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td valign=&quot;top&quot;><table width=&quot;15px&quot; height=&quot;15px&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
<td rowspan=&quot;2&quot;>Have any text you like here</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>



I don't know if this might help........

grtfercho çB^]\..
&quot;Imagination is more important than Knowledge&quot; A. Einstein
 
The problem is the cell that is highlighted still comes up and resizes. This is the cell I need to stay the same hight and width:

<table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td valign=&quot;top&quot;> <table width=&quot;15px&quot; height=&quot;15px&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td> </td>
</tr>
</table></td>
<td rowspan=&quot;2&quot;>Have any text you like here</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
 
Why not make a table ( 1 row, 2 columns)

1st colunm 2 tables (1 15px high, 2nd whatever)
2nd column no tables (no need of rowspan)

Code:
<table width=&quot;300&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
  <tr>
    <td width=&quot;15&quot;> 
      <table width=&quot;15&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; height=&quot;15&quot;>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
    <td>have any text you like here</td>
  </tr>
</table>
 
I played with this and it seems to work fine as long as you <br /> at the end of your sentences.

<table width=&quot;80%&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tr><td>
<!-- This is the part that makes the 15 pixel portion for your image or whatever -->
<table width=&quot;15px&quot; height=&quot;15px&quot; border=&quot;2&quot;><tr><td> Image goes here! </td></tr></table>
</td>
<td rowspan=&quot;2&quot;> All the text in the world can go here!!!
</td>
</tr>
<tr width=&quot;80%&quot;>
<td>
</td>
</tr>
</table>
<table width=&quot;80%&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tr>
<td> And this is the bottom!!!! Or main page or whatever!!!
</td>
</tr>
</table>

I intentionally left the borders on so that you could see it more clearly... If anyone knows of a style CSS property that stops tables from resizing when too much text is entered then please post it here as I was unable to locate anything like that!!! (If I had found something then I was going to use CSS instead of stright HTML...

ps. I was testing to see if the sigs accept HTML as well... so please don't laugh if mine looks kinda funny...LOL

<center>
<h3> RAzTerMAN </h3>
<p>Sometimes you have to grab the wolf by the ears.</p><br />
<p>AND</p><br />
<p>When you have the wolf by the ears it's as hard to hold on as it is to let go.</p>
</center>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top