homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

Vertically align table

5+ Year Member

Msg#: 3890250 posted 10:57 pm on Apr 10, 2009 (gmt 0)

Is there a way to vertically center a table? I don't want the content inside the table to be vertically centered (<td valign="middle">), but the entire table.

I know you can align the table width, like this:

<table width="700" height="700" border="0" align="center" cellpadding="0" cellspacing="0">
<td background="bground_trans.png">&nbsp;</td>

So is there a html code to vertically center the table also?

Thanks a lot

[edited by: eelixduppy at 5:35 pm (utc) on April 13, 2009]
[edit reason] disabled smileys [/edit]



WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3890250 posted 1:43 am on Apr 11, 2009 (gmt 0)

This was mentioned recently [webmasterworld.com] and one solution is Dead Centre [webmasterworld.com] originally posted here by SuzyUK.

FYI, valign="middle" is the default behavior of a table cell in most browsers, no need to specify it, and valign is also deprecated as is nowrap, width, and height.


5+ Year Member

Msg#: 3890250 posted 10:06 pm on Apr 19, 2009 (gmt 0)

I would assume the best solution is to use css to control the padding/margin for the placement of the table within your webpage?

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved