new to web design... please help!!

Discussion in 'HTML & Website Design' started by jawrich, Dec 12, 2009.

  1. #1
    I am putting together a website for a non profit, i have dreamweaver cs4 which is really helpful. I just cant seem to figure out how to have the webpage centered on the screne.. it looks good on my computer, but when i have my friend log on to the website, (from a different computer) the page is all the way to the left... if anyone has any codes or suggestions I would really appreciate it!!....
     
    jawrich, Dec 12, 2009 IP
  2. jwitt98

    jwitt98 Peon

    Messages:
    145
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Generally the way to center your content is to wrap everything in a div.
    Ex:
    <div id="mainWrapper">
    ---All your page content inside your <body> tags goes here---
    </div>
    Code (markup):
    And then apply margin-left and margin-right like so:
    #mainWrapper{
      margin-left: auto;
      margin-right: auto;
    }
    Code (markup):
     
    jwitt98, Dec 12, 2009 IP
  3. photoshoppie

    photoshoppie Peon

    Messages:
    393
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    the page comes in the center even if u not give
    margin-left:auto;
    margin-right:auto; but only in internet explorer , as other browsers like firefox u have to give
    #main{
    margin-left: auto;
    margin-right: auto;
    }
    in the main div inside which u r taking all the divs.

    Hope this will help.
     
    photoshoppie, Dec 13, 2009 IP
  4. jawrich

    jawrich Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Awesome... thanks for the responce. hopefully I can make this work, if not i will ask more questions... thank you
     
    jawrich, Dec 13, 2009 IP
  5. sameer khan

    sameer khan Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    <div id="mainWrapper">
    ---All your page content inside your <body> tags goes here---
    </div>
     
    sameer khan, Dec 13, 2009 IP
  6. jtaylo49

    jtaylo49 Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Agreed. That fixes everything. =)
     
    jtaylo49, Dec 13, 2009 IP
  7. combus

    combus Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You could also use the shorhand for the margin CSS.

    
    #main {margin: 0 auto}
    
    Code (markup):
    The first number (0) gives the margin on the top and bottom of the element, and the second (auto) is for the right and left of the element. With auto there, the container should be centered.
     
    combus, Dec 14, 2009 IP
  8. amitporeli

    amitporeli Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    please give your website URL and contact me


     
    amitporeli, Dec 14, 2009 IP