How to vertically middle align a table?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Want to put contents in a table (one column and one cell) and this table
should show in the center (horizontally) AND the middle (vertically) of
browser window when loaded. How to do that?
 
Set your table and cell alignment (horizontal/vertical) properties
- but if you are trying to get a table by itself to just appear in the center of a page, you can't do that unless you resort to
absolute positioning of a div

--




| Want to put contents in a table (one column and one cell) and this table
| should show in the center (horizontally) AND the middle (vertically) of
| browser window when loaded. How to do that?
 
Or nest the table in another table set to 100% width and height.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Stefan B Rusynko said:
Set your table and cell alignment (horizontal/vertical) properties

That will only align the cell's contents, not the table itself (there isn't
a vertical alignment for tables).
- but if you are trying to get a table by itself to just appear in the
center of a page, you can't do that unless you resort to
absolute positioning of a div

Which of course won't work at different browser window sizes.
 
Why not?

--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
How to ask a newsgroup question:
http://support.microsoft.com/kb/555375
===
|
| | > Or nest the table in another table set to 100% width and height.
|
| That won't work reliably, unfortunately.
|
|
| --
| Patty Ayers | www.WebDevBiz.com
| Free Articles on the Business of Web Development
| Web Design Contract, Estimate Request Form, Estimate Worksheet
| --
|
|
 
It has never failed to work for me.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Nor me. In any browser I've checked with.
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
How to ask a newsgroup question:
http://support.microsoft.com/kb/555375
===
| It has never failed to work for me.
|
| --
| ==============================================
| Thomas A. Rowe (Microsoft MVP - FrontPage)
| ==============================================
| If you feel your current issue is a results of installing
| a Service Pack or security update, please contact
| Microsoft Product Support Services:
| http://support.microsoft.com
| If the problem can be shown to have been caused by a
| security update, then there is usually no charge for the call.
| ==============================================
|
| | >
| > | >> Or nest the table in another table set to 100% width and height.
| >
| > That won't work reliably, unfortunately.
| >
| >
| > --
| > Patty Ayers | www.WebDevBiz.com
| > Free Articles on the Business of Web Development
| > Web Design Contract, Estimate Request Form, Estimate Worksheet
| > --
| >
| >
|
|
 
I don't disagree with the heighth part.

--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
How to ask a newsgroup question:
http://support.microsoft.com/kb/555375
===
| Here's the an article which explains it well:
|
| http://www.apptools.com/examples/tableheight.php
|
|
| --
| Patty Ayers | www.WebDevBiz.com
| Free Articles on the Business of Web Development
| Web Design Contract, Estimate Request Form, Estimate Worksheet
| --
|
|
| | > Nor me. In any browser I've checked with.
| > --
| > ===
| > Tom "Pepper" Willett
| > Microsoft MVP - FrontPage
| > ---
| > About FrontPage 2003:
| > http://office.microsoft.com/home/office.aspx?assetid=FX01085802
| > How to ask a newsgroup question:
| > http://support.microsoft.com/kb/555375
| > ===
| > | > | It has never failed to work for me.
| > |
| > | --
| > | ==============================================
| > | Thomas A. Rowe (Microsoft MVP - FrontPage)
| > | ==============================================
| > | If you feel your current issue is a results of installing
| > | a Service Pack or security update, please contact
| > | Microsoft Product Support Services:
| > | http://support.microsoft.com
| > | If the problem can be shown to have been caused by a
| > | security update, then there is usually no charge for the call.
| > | ==============================================
| > |
| > | | > | >
| > | > | > | >> Or nest the table in another table set to 100% width and height.
| > | >
| > | > That won't work reliably, unfortunately.
| > | >
| > | >
| > | > --
| > | > Patty Ayers | www.WebDevBiz.com
| > | > Free Articles on the Business of Web Development
| > | > Web Design Contract, Estimate Request Form, Estimate Worksheet
| > | > --
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 
I don't use or see a need in general to use DOCTYPES in my projects, so I don't see this as a
problem.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
You see no need to write valid code? Or to have browsers render your pages
in standards-compliant mode, rather than using their outdated "quirks mode"?

I'm just askin'. :-)
 
Apparently some major sites such as google and foxnews don't find the need
;-)
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
How to ask a newsgroup question:
http://support.microsoft.com/kb/555375
===
| You see no need to write valid code? Or to have browsers render your pages
| in standards-compliant mode, rather than using their outdated "quirks
mode"?
|
| I'm just askin'. :-)
|
|
| --
| Patty Ayers | www.WebDevBiz.com
| Free Articles on the Business of Web Development
| Web Design Contract, Estimate Request Form, Estimate Worksheet
| --
|
|
| | >I don't use or see a need in general to use DOCTYPES in my projects, so I
| >don't see this as a problem.
| >
| > --
| > ==============================================
| > Thomas A. Rowe (Microsoft MVP - FrontPage)
| > ==============================================
| > If you feel your current issue is a results of installing
| > a Service Pack or security update, please contact
| > Microsoft Product Support Services:
| > http://support.microsoft.com
| > If the problem can be shown to have been caused by a
| > security update, then there is usually no charge for the call.
| > ==============================================
| >
| > | >> Here's the an article which explains it well:
| >>
| >> http://www.apptools.com/examples/tableheight.php
| >>
| >>
| >> --
| >> Patty Ayers | www.WebDevBiz.com
| >> Free Articles on the Business of Web Development
| >> Web Design Contract, Estimate Request Form, Estimate Worksheet
| >> --
| >>
| >>
| >> | >>> Nor me. In any browser I've checked with.
| >>> --
| >>> ===
| >>> Tom "Pepper" Willett
| >>> Microsoft MVP - FrontPage
| >>> ---
| >>> About FrontPage 2003:
| >>> http://office.microsoft.com/home/office.aspx?assetid=FX01085802
| >>> How to ask a newsgroup question:
| >>> http://support.microsoft.com/kb/555375
| >>> ===
| >>> | >>> | It has never failed to work for me.
| >>> |
| >>> | --
| >>> | ==============================================
| >>> | Thomas A. Rowe (Microsoft MVP - FrontPage)
| >>> | ==============================================
| >>> | If you feel your current issue is a results of installing
| >>> | a Service Pack or security update, please contact
| >>> | Microsoft Product Support Services:
| >>> | http://support.microsoft.com
| >>> | If the problem can be shown to have been caused by a
| >>> | security update, then there is usually no charge for the call.
| >>> | ==============================================
| >>> |
| >>> | | >>> | >
| >>> | > | >>> | >> Or nest the table in another table set to 100% width and height.
| >>> | >
| >>> | > That won't work reliably, unfortunately.
| >>> | >
| >>> | >
| >>> | > --
| >>> | > Patty Ayers | www.WebDevBiz.com
| >>> | > Free Articles on the Business of Web Development
| >>> | > Web Design Contract, Estimate Request Form, Estimate Worksheet
| >>> | > --
| >>> | >
| >>> | >
| >>> |
| >>> |
| >>>
| >>>
| >>
| >>
| >
| >
|
|
 
I write valid code, and all of my projects work in all current browsers in quirks mode, so I see not
reason to change, why fix something that is not broken?. I also don't use CSS for much of anything
either.


--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Valid code to me is any code that renders in the targeted browser(s).

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Thomas A. Rowe said:
I write valid code,

Well.. um.. you can't, without a doctype.
...and all of my projects work in all current browsers in quirks mode, so
I see not reason to change, why fix something that is not broken?. I also
don't use CSS for much of anything either.

There are a lot of great reasons to design with web standards and to use
CSS, but I'm sure if you wanted to know more you could find the information
yourself, so I won't belabor the point. :-) To each his own.
 
Thomas A. Rowe said:
Valid code to me is any code that renders in the targeted browser(s).

Ok - but when the term 'valid code' is used in the web development industry,
it has a specific meaning, much different than your definition. Just FYI.
:-)
 
Folks were writing HTML code long before the DOCTYPE was implemented, and sites in general work just
fine, and second there are no HTML standards, just recommendations/guidelines. The closest thing to
a standard is HTML 3.2 which all browsers support.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Back
Top