Forum Moderators: open

Message Too Old, No Replies

Equals cols

How to I get them looking tidy

         

peewhy

1:15 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have inserted a table with three columns. When I place text in each one, I cannot get the text to sit at the top. I'm using Dreamwaever 4 in standard HTML. For some reason Dreamweaver balances the text so it sits unevenly and I can't find the facility to tell it that I want all text to start at the top.

Can anyone help please.

BlobFisk

1:44 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi peewhy,

You can do this using CSS. Put a class or ID on your table and then:


#tableID td {
text-align: left;
vertical-align: top;
}

HTH

topr8

2:02 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



or without css,

in dw, click in the cell you want the text to align to the top and in the properties window, set the 'vertical' box to 'top' - do this for all three cells for them all to align to the top.

peewhy

2:06 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks BlobFisk

I've never done CSS. Can I simply add that code above the html for the table. This is the table code (I know you know what it looks like!)..or where do I place your snippet and how or where do I name the table?

<table width="100%">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

Many thanks

peewhy

2:15 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for your quick responses

I followed Topr8...easy peasy, even for an idiot like me.

Many thanks to both of you.

BlobFisk

2:29 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does Dreamweaver use CSS to control the alignment in the cells or the valign attribute?

Just worth adding that the width and height attributes were deprecated in HTML4.01...

Have a look at the W3C documentation on table cell horizontal and vertical alignment [w3.org].

HTH

peewhy

2:32 pm on Mar 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm assuming it is VALIGN, here's the line
<TD WIDTH="33.3%" valign="top">

Thanks