Welcome to WebmasterWorld Guest from 54.196.147.57

Forum Moderators: incrediBILL

Message Too Old, No Replies

Align table at bottom (center)

     

dbzfyam

12:58 pm on Feb 19, 2005 (gmt 0)

10+ Year Member



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

9:33 pm on Feb 20, 2005 (gmt 0)

10+ Year Member



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

firstreflex

12:46 am on Feb 21, 2005 (gmt 0)

10+ Year Member



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

6:39 am on Feb 21, 2005 (gmt 0)

10+ Year Member



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

5:06 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



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:59 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



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

9:09 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



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>

 

Featured Threads

Hot Threads This Week

Hot Threads This Month