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 11
  1. #1
    Join Date
    Jul 2005
    Posts
    1,653
    Tokens
    50

    Latest Awards:

    Default Basic two column css layout - free (xhtml/css)

    Hey

    Here's the code..

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    div#header {
    width: 790px;
    background: #234374;
    height: 100px;
    margin-bottom: 20px;
    }
    div#container {
    width: 790px;
    margin: auto;
    }
    div#sidebar {
    width: 190px;
    margin-right: 20px;
    float: left;
    background: #4D84BB;
    padding: 5px;
    }
    div#content {
    width: 560px;
    float: right;
    background: #22344A;
    padding: 5px;
    }
    </style>
    </head>
    
    <body>
    
    <div id="container">
        <div id="header">header</div>
        
        <div id="sidebar">content</div>
        
        <div id="content">stff</div>
    </div>
    
    </body>
    </html>
    It's untested but it should work... basically that's the basics for a layout that can be adapted. It should give you an insight into how to code xhtml/css as well..

    For example, the boxes we use the attribute background. It could be changed to say, background: url("images/bg.gif") repeat-x; to create an expanding image background, easy as.

    Also, to add a background, in the <style> tags, add ..

    Code:
    body {
    background: #hexcode;
    }
    If you need any css help or want to edit this layout or anything related to xhtml/css .. ask here.

    Gonna add some more stuff to this thread but ...

    If you wanna change the font use:

    font: normal 12px arial;

    You can change normal to bold or italic or whatever as well as the size. Now, you can either add it in the body styling or a certain div, which means you can have different font styles for different divs.

    If you wanna change font color:

    color: #hexcode;

    Thread moved to tutorials & guides by --ss-- (Forum Super Moderator): Great guide!
    Last edited by --ss--; 02-02-2008 at 01:14 PM.

  2. #2
    Join Date
    Jul 2008
    Posts
    16
    Tokens
    0

    Default

    This isn't even worth being called a tutorial.

  3. #3
    Join Date
    May 2008
    Posts
    910
    Tokens
    0

    Default

    More of a resource, but nice one.

  4. #4
    Join Date
    Oct 2006
    Posts
    12,405
    Tokens
    0

    Latest Awards:

    Default

    Sorry to bump, but what in the code tells each of the three boxes where to be? And how would I add more and where I want?

    Edit: And how do I get rid of the word "header"? The only place I see it is div#header but if I remove it there, the whole div (I think) disappears...
    Last edited by Black_Apalachi; 10-11-2008 at 09:49 PM.

  5. #5
    Join Date
    May 2008
    Posts
    1,160
    Tokens
    11

    Latest Awards:

    Default

    Quote Originally Posted by Robald View Post
    Sorry to bump, but what in the code tells each of the three boxes where to be? And how would I add more and where I want?

    Edit: And how do I get rid of the word "header"? The only place I see it is div#header but if I remove it there, the whole div (I think) disappears...
    <div id="header">header</div>
    That's where the "Header" text is located
    Previously a Habbo fanatic, web designer/developer, fansite owner, & trusted member of the community.

  6. #6
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    This isn't a tutorial :S:S


  7. #7
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Quote Originally Posted by Robald View Post
    Sorry to bump, but what in the code tells each of the three boxes where to be? And how would I add more and where I want?
    float: left; and float: right; position the boxes.

    It's quite hard to explain how to position them, but there's lots of guides in this section which can tell you how to and I'm sure that they would make you understand.

  8. #8

    Default

    Quote Originally Posted by Jxhn View Post
    float: left; and float: right; position the boxes.

    It's quite hard to explain how to position them, but there's lots of guides in this section which can tell you how to and I'm sure that they would make you understand.
    Can you explain that?

  9. #9

    Default

    Quote Originally Posted by mattywatson07 View Post
    Can you explain that?
    Float left makes it float left, and float right makes it float right. As Jxhn said, check out tutorials or click here.

  10. #10
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    853
    Tokens
    0

    Default

    It's helpful but it isnt a tut
    Cheap Layout Coding
    PM For Free Quote

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
  •