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>

Link to comment
Share on other sites

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!

Link to comment
Share on other 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.

Link to comment
Share on other sites

Friends,

 

we have solved,

 

I did the following,

 

  <table width="100%" border="0" cellpadding="0" cellspacing="0">

    <tr>

      <td><table width="769" border="0" align="center" cellpadding="5" cellspacing="0">

        <tr>

bla bla bla....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.