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!

Table Cell Alignment Question

Status
Not open for further replies.

bitwise

Programmer
Mar 15, 2001
269
US
Here's a simple example to illustrate my question. Say you have this table...

Code:
<table border=1>
<tr>
<td valign=top>text1</td>
<td rowspan=2>text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text 2 text2 text2 text2 text2 text2 text2 text2</td>
</tr>

<tr>
<td valign=top>text3</td>
</tr>
</table>

Notice the rowspan=2 on the "text2" table. My only question is, how can you keep the text3 table cell to stay under the text1 table cell? They are both "valign=top", but if you shrink the table via browser resize, then the text1 and text3 both simply use 50% height. I want text3 to stay under text1 completely. Obviously, this is for a larger problem, but the simply table above illustrates the same thing. Thank you!
 
It's always underneath (that's not the problem). The problem is that I would like "text3" to stay immediately under "text1" all the time. If you shrink the browser window or something, or add more text to "text2" you'll notice that "text3" will start to move down as the browser moves the cells. The height of the cell "text1" and "text3" will begin to be 50% each.
 
Try giving your text1 cell a fixed height.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Please ignore this post if necessary (I'm still a novice) but can it have anything to do with the space in one of your text2's or was this simply an example?

text2 text2 text 2

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top