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 19

Thread: code

  1. #1
    Join Date
    Dec 2006
    Posts
    135
    Tokens
    0

    Default code

    What is the code to center a layout and make it touching the top of the screen? i have forgotten

  2. #2
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Ummm its css.. one sec

    Code:
    <html>
    <head>
    <style type="text/css">
    body { margin-top: 0px; }
    </style>
    </head>
    <body>
    </body>
    </html>
    I think thats its..

  3. #3
    Join Date
    Dec 2006
    Posts
    135
    Tokens
    0

    Default

    nope, thats not it

  4. #4
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    hmm.... idk off the top of my head.. im half asleep anyway.. and .. I just got back on this account.. so... ill find out soon! let me look in my code library

    Code:
    <style type="text/css">
    <!--
    body {
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    -->
    </style>
    That aligns it all the way in the left..
    Last edited by Dentafrice1; 03-12-2006 at 12:51 AM.

  5. #5
    Join Date
    Dec 2006
    Posts
    135
    Tokens
    0

    Default

    For some reason it doesnt goto the very top but it should do for me, thanks Dent

  6. #6
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    I dont think CSS can go into the minus range.. you could try -1 as one of those.. could you give me the link to the page your doing it on?

    Kevin

  7. #7
    Join Date
    Jun 2006
    Location
    Manchester
    Posts
    56
    Tokens
    0

    Default

    Although I haven't used this try:

    HTML Code:
    <style type="text/css">
    <!--
     
    * {
        margin: 0px;
        padding: 0px;
    }
     
    body { 
        margin-top: 100&#37;;
        margin-bottom: 100%;
    }
    </style>
    Last edited by Net-Margin; 03-12-2006 at 01:33 AM.

  8. #8
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Hmm.. That was what I was missing. padding.. but.. Hmm.. Idk.. maybe:


    Code:
    <style type="text/css">
    <!--
    body {
                 padding: 0px;
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    -->
    </style>

  9. #9
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Easer way of removeing all padding and margins is just
    Code:
    body{
    margin:0px 0px 0px 0px;
    padding:0px 0px 0px 0px;
    }
    centering, depends, most the time this attribute will work
    Code:
    text-align:center;
    Although it doesnt effect things live Div layers

  10. #10
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    He wants the layout to be centered.. not the text. And he wants no margins and no padding.. soo hmm. I think mine would work.

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
  •