Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Center Site?

  1. #1
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Center Site?

    I am trying to center the entire content of my site so it looks like it has borders all the way around but I cannot seem to get it to center. I checked the FAQ's and saw something on centering sites and tried it but nothing worked.

    Code:
    <body background="/images/bg.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
    <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr><td>
    Here is a link to how it looks.http://www.mklandscaping.com/index_new As you can see the background is the grey but I want all the content to be on a white centered table.Any help would be gladly appreciated. Thank you

  • #2
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You can't use the absolute positioning the way you do if you expect your site to center. You will need to add a doctype, search around for doctype on www.w3schools.com and you will need to use margin:auto; to center your table, if you make your table position:relative; in CSS the absolute positioning will go off of the table rather than the browser (body).
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •