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 16
  1. #1
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default Centering + Border

    How would I center a layout and give it a 1 px border?


    Selling DJ/Habbo layout, more info here.


  2. #2
    Join Date
    Sep 2007
    Location
    London
    Posts
    162
    Tokens
    0

    Default

    Do you mean the actual code?
    Or doing it graphically in photoshop?


    This is the price you pay,
    for
    loss of control

    Rep = 139 thanks to mattmeister. :eusa_danc

  3. #3
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Give the BODY the text-align of center maybe (or just use <center> tags which aren't valid though).

    Then put the layout in a div and add "border: 1px solid #000000" to it's style.

  4. #4
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    Give the BODY the text-align of center maybe (or just use <center> tags which aren't valid though).

    Then put the layout in a div and add "border: 1px solid #000000" to it's style.
    It centers the text, I want it to center the layout.


    Selling DJ/Habbo layout, more info here.


  5. #5
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <style=border
    Css:
    PHP Code:
    .border {
    border2px solid #color; 
    ?

  6. #6
    Join Date
    Sep 2007
    Location
    London
    Posts
    162
    Tokens
    0

    Default

    then put the <center> at the very beginning after the <html> <head> tags.


    This is the price you pay,
    for
    loss of control

    Rep = 139 thanks to mattmeister. :eusa_danc

  7. #7
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    I want to make it valid, so iwho knows the way using CSS?


    Selling DJ/Habbo layout, more info here.


  8. #8
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    <div align="center">
    under the body tag

    </div>
    before the </body> tag.
    Coming and going...
    Highers are getting the better of me

  9. #9
    Join Date
    Oct 2006
    Location
    Merseyside
    Posts
    2,335
    Tokens
    0

    Latest Awards:

    Default

    If your using tables just add align="center" to the table.

  10. #10
    Join Date
    Jul 2005
    Location
    North Wales
    Posts
    4,233
    Tokens
    1,544

    Latest Awards:

    Default

    To center the layout add a div around it all I normaly call mine center, and in the css add this:

    HTML Code:
    .center {
    margin-left: auto;
    margin-right: auto;
    width: (enter the width of your whole design here)px;
    }
    And if you want a border just use this;

    HTML Code:
    .center {
    margin-left: auto;
    margin-right: auto;
    width: (enter the width of your whole design here)px;
    border: 1px;
    }

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
  •