Results 1 to 7 of 7

Thread: Div layout

  1. #1
    Join Date
    Feb 2006
    Location
    /usr/local
    Posts
    2,809
    Tokens
    688

    Latest Awards:

    Default Div layout

    Hey all,
    I want to center my Div layouts boxes, but every time i do, they go out of place like:
    http://www.habbocafe.com/SITE/index.php

    The only way i get them into place is to have this CSS:
    HTML Code:
    body {
      margin: 10px;
      padding: 0px;
    }
    #container {
      width: x-pixels;
      height: auto;
      margin: auto;
    }
    #marquee{
      background: #0099FF;
      width: 800;
    }
    #header {
      background: #0f0;
      width: 800;
    }
    #leftcol {
      background: #f00;
      width: 200;
      background-position: left;
      text-align: left;
    }
    #content {
      background: #fff;
      width: 600;
      background-position: center;
      text-align: center;
    }
    #footer {
      background: #0f0;
      clear: both;
      width: 800;
    }body {
      margin: 10px;
      padding: 0px;
    }
    #container {
      width: x-pixels;
      height: auto;
      margin: auto;
    }
    #marquee{
      background: #0099FF;
      width: 800;
    }
    #header {
      background: #0f0;
      width: 800;
    }
    #leftcol {
      background: #f00;
      width: 200;
      float: right;
    }
    #content {
      background: #fff;
      width: 600;
      float: center;
    }
    #footer {
      background: #0f0;
      clear: both;
      width: 800;
    }
    While having my contain box aligned to the left or removing it. But it aligns them to the left.
    Note: the container is doing nothing atm
    Last edited by Swinkid; 31-07-2008 at 01:52 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    "The only way i get them into place is to have this CSS:"

    Do it then.

  3. #3
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    floateft;

  4. #4
    Join Date
    Feb 2006
    Location
    /usr/local
    Posts
    2,809
    Tokens
    688

    Latest Awards:

    Default

    Quote Originally Posted by Meti View Post
    Do it then.
    I ment only by aligning them to the left. sorry.

    Quote Originally Posted by Excellent View Post
    floateft;
    Well spotted, typed out wrong, but even if i done that it still wouldn't align propley.

  5. #5
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    How about changing the container width to 800px; instead of x-pixels?

  6. #6
    Join Date
    Feb 2006
    Location
    /usr/local
    Posts
    2,809
    Tokens
    688

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    How about changing the container width to 800px; instead of x-pixels?
    That done the trick, thank you + rep.

  7. #7
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    No problem Any other help just PM me.

Posting Permissions

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