Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jun 2008
    Posts
    138
    Tokens
    0
    Habbo
    iSonny.

    Latest Awards:

    Default center a layout in IE + Firefox

    Can anyone please tell me how to center a layout in IE and FF

    Atm I use this:

    HTML Code:
    body {
    background-image: url(images/bg.gif);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: grey;
    margin: 0;
    }
    * {margin: 0;}
    
    #wrapper {
    margin: auto;
    width: 918;
    In the style, and this in the body:

    HTML Code:
    <div id="wrapper">
    Layout Contents
    </div>
    If you need to see the layout ask me and ill PM you it!

    Thanks to anyone that helps!

  2. #2
    Join Date
    Apr 2007
    Posts
    2,431
    Tokens
    0

    Latest Awards:

    Default

    Add:

    margin-left:auto;
    margin-right:auto;

    [X] [X] [X]

  3. #3
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    <div align="center">
    [content]
    </div>

  4. #4
    Join Date
    Jun 2008
    Posts
    138
    Tokens
    0
    Habbo
    iSonny.

    Latest Awards:

    Default

    Quote Originally Posted by Blob View Post
    <div align="center">
    [content]
    </div>
    That wont work because im using margins.

    Quote Originally Posted by Pazza View Post
    Add:

    margin-left:auto;
    margin-right:auto;
    Where do I add this? In the body css?

  5. #5

    Default

    I believe so yes, just try it and see.

  6. #6
    Join Date
    Jun 2008
    Posts
    138
    Tokens
    0
    Habbo
    iSonny.

    Latest Awards:

    Default

    Quote Originally Posted by Jam-ez View Post
    I believe so yes, just try it and see.
    It didn't work

    Thanks anyway!

  7. #7

    Default

    Check my next post, if that doesn't work use this:

    Last edited by Jam-ez; 17-05-2009 at 10:53 AM.

  8. #8
    Join Date
    Feb 2009
    Location
    West Midlands, UK
    Posts
    239
    Tokens
    0

    Default

    body {
    margin: auto;
    }

  9. #9

    Default

    Quote Originally Posted by Knuxxy View Post
    body {
    margin: auto;
    }
    That's the one!

    Ignore my previous code, try this instead then:



    Or just try everything...

  10. #10
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    HTML Code:
    body {
         background: #FFF;
         font-family: Arial, Helvetica, Times New Roman;
         color: #1d1d1d;
         /* other body properties here */
    }
    
    #container {
         width: 950px;
         margin: auto;
    }
    
    #somethingInsideContainer {
         width: 100%;
         height: 200px;
         background: #333;
         float: left;
    }
    HTML Code:
    <div id="container">
         <div id="somethingInsideContainer"></div>
    </div>

Page 1 of 2 12 LastLast

Posting Permissions

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