...

View Full Version : can vertical-align only be applied to images?



canadianjameson
09-14-2007, 09:59 PM
Hi,

i have a table cell and within it a div. I want to have this be be vertical-align: middle but it doesn't seem to work.

Is what I'm trying to do impossible or have I just mis-used the css?



<td class="thismonth tue" valign="top"> <div class="date">11</div>
<div class="cell">
<div class="alertTitle">Clinic Cancelled<br>-!-<br>Clinique Annul&eacute;e</div>
</div></td>

and

div.alertTitle {
color: #FF0000;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
padding-bottom: 2px;
text-align: center;
vertical-align: middle
}

nikkiH
09-14-2007, 10:08 PM
It is aligning, just to its parent container.
Set the width to 100%, or set the align on the TD, not the div.

canadianjameson
09-14-2007, 10:15 PM
Setting the TD align wont work because i have multiple divs within the TD, but i found a way around it :)

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum