Jump to content

[SOLVED] centering a page in the sceen


oceans

Recommended Posts

I think i would be tempted to use tables for example:

 

<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
    <td align="center">
        <table border="0" cellpadding="0" cellspacing="0" width="780">
             <!-- your cells in here  //-->
        </table>
   </td>
</table>

no friend,

 

not working,

i believe this will center the content in a table,

but i want to center the whole table to a screen.

 

 

thats what that code snippet i gave earlier does.

 

u make a global table (the one with a width of 100% that spreads it across the screen no matter what screen size) and then you create a cell (the one that says <td align="center"> and that will be the witdth of the screen and center aligned) and then you put your actual table with the site in it in there.

 

that *will* center align the whole page, i know because i use that very method myself, as i hate non-centered sites!

Well you got two ways to do it

 

First put a table in a div like so.

 

<div><table></table></div>

 

and you center the div instead ....<div align="center"><table></table></div>.

 

Or just center the table by using the body tag ......i aint sure how to do that within the tag, but it can be done with css.

 

However i suggest u use div cause its more efficient and controllable than the body tag :)

 

Cheers.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.