Getting Page to Align in the Center of the Screen

Discussion in 'HTML & Website Design' started by szkoda, Oct 20, 2008.

  1. #1
    I have no idea why, but this page will not align in the center of the page.

    I have a feeling its something to do with the tables ive used to layout my site (I used photoshop to convert my .PSD to .HTML).

    Any help would be greatly appreciated.
     
    szkoda, Oct 20, 2008 IP
  2. azouzdesign

    azouzdesign Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    38
    #2
    I'm on firefox and the page is aligned in the center of the page. Anyway if you use dreamweaver a simple way is to go into layout mode make one big layout cell and insert all the contents there and simply align it to the center
     
    azouzdesign, Oct 20, 2008 IP
  3. Magestry

    Magestry Active Member

    Messages:
    822
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Simply add

    
    <div align="center"> and </div>
    
    Code (markup):
    tags around all your content, its the easiest way :D

    If you find it useful, +rep apreciated!
     
    Magestry, Oct 20, 2008 IP
  4. szkoda

    szkoda Banned

    Messages:
    189
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #4
    ive already tried that, it doesnt work for some reason...
     
    szkoda, Oct 20, 2008 IP
  5. skateme

    skateme Peon

    Messages:
    162
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Align has been deprecated. szkoda, which browser is the table not aligned in? It works fine in Safari, and according to azouzdesign, it works in Firefox too. So, are you viewing it in IE6 or IE7?
     
    skateme, Oct 20, 2008 IP
  6. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Set the doctype to transitional xhtml and set margin: 0 auto; on the css of your wrapper, works best.
     
    garrettheel, Oct 21, 2008 IP
  7. Jodarl

    Jodarl Peon

    Messages:
    38
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You have this code:

    <table id="Table_01" height="1135" width="1297" cellspacing="0" cellpadding="0" border="0">

    Some people is seeing the page in the center because they using a bigger and wider screen, so they see it as centered.

    If you are using 1024x768 you will see it as off centered.
    Set width to 800.
     
    Jodarl, Oct 21, 2008 IP
  8. szkoda

    szkoda Banned

    Messages:
    189
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #8
    Yes as jodarl said its only on lower resolutions that the problem occurs (1280x1024 and lower). I changed the width of the table but it has made no difference.

    I have not used CSS to layout the page, its all been done with tables (yes i know it should be layout with CSS).

    Any other suggestions?

    EDIT: Fixed it now, had two columns on the edge of the page that were messing up the layout of the page.

    Thanks for the help from everyone
     
    szkoda, Oct 21, 2008 IP