CSS positioning
Hello.. My 2nd request for the day is, "How do you make a table position in the center of the page?" I have a 640x480 table that houses all the information for the site (please see http://www.kentonfriendsofyouth.org/skyjuice/home.htm) and I want to position it vertically within the browser. Any suggestions?
mmi posted this at 21:33 — 23rd March 2002.
They have: 457 posts
Joined: Jan 2001
hey Delmar - try nesting yer table in "containing table" with height set to 100% - you might need to valign the cell to "middle" - not sure
btw, you have an error here
do you mean "valign"?
Web Xpertz Community Forums for Webmasters & Developers
Where You Can Learn, Advise, and Have Fun in the Process
Busy posted this at 21:47 — 23rd March 2002.
He has: 6,151 posts
Joined: May 2001
3 ways to do this
nested tables as MMI mentioned, with Javascript or CSS
CSS isnt fully compatiable yet so probably isnt wise (can be done but getting it to work on version 4,5 and 6 browsers takes some work).
Javascript can be turned off so again probably isnt wise
Nested tables does work (make outside table 100% both ways) but for validation purposes this is the wrong way.
but I see your using things like iframes and fixed bgproperties which arent universal between browsers anyways, so take your pick
if you add align="center" in your table tag, it will center your table horziontaly (will center table only, not tables contents, add align="center" in td tag for this)
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.