Click here to get back home

Vertically centering tables

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Vertically centering tables Daniel Kaplan 09-19-2005
Get Chitika Premium
Posted by Daniel Kaplan on September 19, 2005, 5:21 pm
Please log in for more thread options


Hi All,

Am trying to vertically center a table, and failing miserably at it.

Have tried everything with this:

<table border=1 width=100% valign=MIDDLE>

taking out width, etc. I just can't get the table to be centered.

Can anyone give me a clue?

Thanks ahead, as always.

Daniel





Posted by Rincewind on September 19, 2005, 11:04 pm
Please log in for more thread options


On Mon, 19 Sep 2005 17:21:45 -0400, Daniel Kaplan wrote:

> Hi All,
>
> Am trying to vertically center a table, and failing miserably at it.
>
> Have tried everything with this:
>
> <table border=1 width=100% valign=MIDDLE>
>
> taking out width, etc. I just can't get the table to be centered.
>
> Can anyone give me a clue?
>
> Thanks ahead, as always.
>
> Daniel

<table border="1px" width="100%" valign="center">

Posted by Lauri Raittila on September 20, 2005, 1:18 am
Please log in for more thread options


in comp.infosystems.www.authoring.html, Rincewind wrote:

> > <table border=1 width=100% valign=MIDDLE>

> <table border="1px" width="100%" valign="center">

You added two irrelevant errors, and added nothing. Why do you think it
makes any difference?

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>

Posted by Tom Potts on September 20, 2005, 12:25 am
Please log in for more thread options


<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<table>
<tr><th>header1</th><th>header2</th></tr>
<tr><td>data1</td><td>data2</td></tr>
</table>
</td>
</tr>
</table>


Posted by Lauri Raittila on September 20, 2005, 1:07 am
Please log in for more thread options


in comp.infosystems.www.authoring.html, Daniel Kaplan wrote:
> Hi All,
>
> Am trying to vertically center a table, and failing miserably at it.

I don't wonder. Why and in what? There is some CSS to do that in some
cases:
http://www.student.oulu.fi/~laurirai/www/css/middle/

If you want to center whole page in IE, use HTML. It is bad idea, and not
only because of nested tables.

> Have tried everything with this:

I assume you ahve not searched the web nor read the spec? (latter would
not help though, as it is not possible by HTML spec.)

> <table border=1 width=100% valign=MIDDLE>
>
> taking out width, etc. I just can't get the table to be centered.
>
> Can anyone give me a clue?

There is no HTML that can be used to center a table vertically. All it
allows is to center contents of table cell (you don't need to do
anything to get that)



--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>

Similar ThreadsPosted
centering text vertically in div November 9, 2007, 1:39 am
Lost ability to center tables vertically December 27, 2005, 11:15 am
Aligning content vertically September 8, 2005, 7:59 pm
dumb noob cannot get UL to stack vertically August 29, 2008, 2:17 pm
How can I display a right arrow in IE aligned vertically in the middle? October 16, 2005, 9:39 am
making div stretch vertically to same size as neighbor div November 8, 2007, 1:12 am
Centering a DIV within a DIV? October 27, 2005, 2:31 pm
CSS issues with IE - not centering div November 14, 2007, 12:04 pm
Centering a Table April 11, 2008, 2:07 pm
centering page April 29, 2008, 1:06 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap