HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Different alignments within a table cell
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Table
View previous topic :: View next topic  
Author Message
edfrombrooklyn



Joined: 09 Mar 2005
Posts: 3

PostPosted: Wed Mar 09, 2005 8:59 am     Different alignments within a table cell Reply with quote

I'd like to know if there's anyway to align text in more than one way within a single table cell. In other words, I want some text to be pushed all the way to the top of the cell, and some to be pushed all the way to the bottom.

<html>
<head>
<title>Page Title</title>
</head>

<body>
<table>
<tr>
<td height="200">I want this line on top of the cell<br>I want this line on the bottom
</td>
</tr>
</table>
</body>
</html>
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Wed Mar 09, 2005 11:00 am     Reply with quote

Not really. The easiest way would be to split the cell and use the vAlign attribute
edfrombrooklyn



Joined: 09 Mar 2005
Posts: 3

PostPosted: Wed Mar 09, 2005 1:55 pm     Reply with quote

Yeah, but that would only work if there was someway to insure that the sub-cells filled the entire parent cell. Is there?
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Wed Mar 09, 2005 1:57 pm     Reply with quote

not sure what you mean
edfrombrooklyn



Joined: 09 Mar 2005
Posts: 3

PostPosted: Sun Mar 13, 2005 5:42 pm     Reply with quote

What I meant was:
You said I could split the cell and use different alignments for the top and bottom. I assume what you meant was to put a new table into the <td>, with two <tr>'s - the top one with a valign="top", and the bottom one with a valign="bottom". Problem is, the table doesn't fill the entire <td>, so either the table is at the top of the <td> and the bottom of the text isn't at the botttom of the <td>, or the table is at the bottom, and the text at the top of the table isn't at the top of the <td>, or the table is in the middle, and nothing's where I want it ! Crying or Very sad

I can't just split the cell by creating two rows in th esurrounding table, because the surrounding table has borders, and I don't want any borders inside this <td>, so the only way to split the cell would be to create a new table inside
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Table All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Webmaster Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial