How come text inside table moves downwards and upwards?

They have: 105 posts

Joined: Mar 2006

Hi,

I have the following layout:

A top table with the website name in it (which goes accros the top of the page)
A menu table on the left (another table)
A main content table to the right of the menu table

How can I stop the text in the content table from always going to middle of the table? To make it go to the top I have to add lots of Is there a way to put the text in place line by line?

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

put valign="top" in your td tag... I think that's right, I never use table attributes anymore. The correct way to do this would be in CSS:

td {vertical-align: top;}

I think that's what you're asking about. It's usually helpful to post a link to your page when asking about HTML like this.

They have: 4 posts

Joined: Sep 2006

Click inside the table cell. Note horz and vert in the property inspector and set your alignment accordingly.

sin0cide's picture

He has: 17 posts

Joined: Oct 2007

would be your answer in html but I believe that attrib is only valid with ie and will not align in ff and if you check most tutorials they won't even mention it as an option. unless the website has the different attribs for each browser which I think would be a waste of time because its just better to have the ones that are widely accepted. Not sure why they did this because obviously someone generated the code and decided yah align=center works but hummm I guess nobody needs to align vertically

Brian(Webdesigner/SEO)

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

I have never heard of valign not working cross browser ... will do a quick test to make sure since I haven't used presetational attributes in years. No, that's definitely not true. Works in Opera, Safari, and Firefox for Mac.

Of course, as I mentioned, the best way to do this is with CSS:

td {vertical-align: top;}

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.