1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need Help to Center layout

Discussion in 'HTML & Website Design' started by worlddomain, Jul 20, 2008.

  1. #1
    I need a little help from anyone who knows how to center a layout

    I have this site that on a large screen does not center its self... I tried a few different things with no luck lol

    anyone out there that can help let me know..
    Thanks
     
    worlddomain, Jul 20, 2008 IP
  2. mywedding

    mywedding Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can use css
     
    mywedding, Jul 20, 2008 IP
  3. kashem

    kashem Banned

    Messages:
    1,250
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #3
    using css you can do that. its better if you can post the url or code you are using to suggest you the change
     
    kashem, Jul 20, 2008 IP
  4. worlddomain

    worlddomain Well-Known Member

    Messages:
    1,138
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    110
    #4
    thanks guys this is what I used from what I found searching around

    <body>
    <div id="container">
    ...entire layout goes here...
    </div>
    </body>

    Using CSS, the following two rules force whatever is contained within #container to be centered:
    body {
    text-align: center;
    }

    #container {
    margin: 0 auto;
    width: xxxpx;
    }

    but its not working out... I guess I'm still doing something wrong lol

    this is the site
    fixandflip.net
    Thanks
     
    worlddomain, Jul 20, 2008 IP
  5. dalem

    dalem Peon

    Messages:
    494
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It looks like you have a fixed width page as it's scrolling across the bottom. Try changing from the fixed width to 100%.
     
    dalem, Jul 20, 2008 IP
    worlddomain likes this.
  6. BlueDevil

    BlueDevil Peon

    Messages:
    19
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Use that code and delete this from the body tag
    width: 1029px;
    Code (markup):
     
    BlueDevil, Jul 20, 2008 IP
    worlddomain likes this.
  7. 4220niller

    4220niller Peon

    Messages:
    35
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Use
    <div align="center">
    Content
    </div>
    
    Code (markup):
    Or use margin in CSS.
     
    4220niller, Jul 20, 2008 IP
    worlddomain likes this.
  8. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #8
    Use margin: 0 auto;

    The "align" attribute is out of date. For example:
    
    #pagecell {
    margin: 0 auto;
    width: 750px;
    }
    
    Code (markup):
    That will center the <div>.
     
    dylanj, Jul 20, 2008 IP
    worlddomain likes this.