Previous Message
Next Message

RE: [css-d] Vertical alignment in table cell

Sent by Joseph Seeley on 5 May 2003 20:08


Wrapping your TD contents in another DIV works in at least a few browsers.

td {
	height: 100px;			/* just making it tall enough to see
the effect */
	border: 1px dashed gray;	/* just so you can see it */
	}
	
div.kludge {
	position: relative;
	height: 100%;
	}

/* force these to the bottom of their container TD */
div.z {
	position: absolute;
	bottom: 0;
	}

[...]

<table>
  <tr>
    <td>
      <div class="kludge">	
	  <div class="x">item1</div>
	  <div class="y"> item2</div>
	  <div class="z">item3</div>
	</div>
    </td>
  </tr>
</table>

-- Joe


-----Original Message-----
From: Gerard Samuel [EMAIL-REMOVED]]
Sent: Saturday, May 03, 2003 11:08 AM
To: CSS Discussion
Subject: [css-d] Vertical alignment in table cell
Importance: High


I've been trying to figure out how to verically align *certain* content 
within a table cell.
The final order should look something like ->
item1
item2

item3

Specifically, "item3" I would like at the bottom of the cell.
Is this possible with css?

Thanks
---------------------------

<table>
  <tr>
    <td><div class="x">item1</div><div class="y"> item2</div><div 
class="z">item3</div></td>
  </tr>
</table>

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: