homepage Welcome to WebmasterWorld Guest from 54.145.183.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Align table at bottom (center)
dbzfyam

5+ Year Member



 
Msg#: 9705 posted 12:58 pm on Feb 19, 2005 (gmt 0)

Hi,

Does anyone know if it's possible to align a table at the bottom of the page and which is centered (html, or a othe language)?

Thank you very much,
Stefan.

 

electricocean

10+ Year Member



 
Msg#: 9705 posted 9:33 pm on Feb 20, 2005 (gmt 0)

you could do a whole bunch of <p>&nbsp;</p>and the do
<div align="center><table></table></div> codes.

firstreflex

10+ Year Member



 
Msg#: 9705 posted 12:46 am on Feb 21, 2005 (gmt 0)

I would try something like this (put a div around your table)

<style type="text/css">
body{
margin:0;
}
div{
text-align:center;
}
table{
position:absolute;
bottom:0;
margin-left:auto;
margin-right:auto;
text-align:left;
}
</style>

dbzfyam

5+ Year Member



 
Msg#: 9705 posted 6:39 am on Feb 21, 2005 (gmt 0)

electricocean, I tried that at first but it won't look good on a smaller screen.

firstreflex , I'll try that out when I'm home. Thanks.

firstreflex

10+ Year Member



 
Msg#: 9705 posted 5:06 pm on Feb 21, 2005 (gmt 0)

Edit - this is the way to go

<style type="text/css">
body{
margin:0;
padding:0;
}
div{
width:100%;
position:absolute;
bottom:0;
text-align:center;
}
table{
margin-left:auto;
margin-right:auto;
text-align:left;
}
</style>

dbzfyam

5+ Year Member



 
Msg#: 9705 posted 5:59 pm on Feb 21, 2005 (gmt 0)

Thank you very much, firstreflex! It seems to be workinging on all browsers aswell. First, I had something like this:


<div style="position:absolute;bottom:0px;left:30%;right:30%">
Content
</a>

This did work, but if the window is smaller than 800x600, it dissappears to the side.

Thanks again,
Stefan.

electricocean

10+ Year Member



 
Msg#: 9705 posted 9:09 pm on Feb 21, 2005 (gmt 0)

With all that said, how would you do that handy dandy css to position a table in the middle of the browser?

would it be:

<style type="text/css">
body{
margin:0;
padding:0;
}
div{
width:100%;
position:absolute;
middle:0;
text-align:center;
}
table{
margin-left:auto;
margin-right:auto;
text-align:left;
}
</style>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
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