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!


Results 1 to 6 of 6

Thread: html help ?

  1. #1
    Join Date
    Jun 2007
    Location
    Leicester
    Posts
    1,607
    Tokens
    0

    Latest Awards:

    Default html help ?

    Whats wrong with my code ??
    Why is there a gap between the header and middle ?

    What it looks like:

    Code:
    HTML 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>
    <title>Box</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    <!--
    body {
      text-align: center;
      background-color: #ffffff;
    }
    #container {
      width: 437px;
    }
    #top {
      background: url(images/box/top3.png);
      height: 30px;
    }
    #mid {
      background: url(images/box/mid2.png);
    }
    #bot {
      background: url(images/box/bot2.png);
      height: 9px;
    }
    -->
    </style>
    </head>
    <body>
    <div id="container">
      <div id="top"><b>Hello</b></div><BR>
      <div id="mid"><BR><BR><BR><BR><BR></div>
      <div id="bot"></div>
    </div>
    </body>
    </center>
    </html>
    Last edited by Jebbo; 04-08-2008 at 09:41 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jebbo View Post
    Whats wrong with my code ??
    Why is there a gap between the header and middle ?

    What it looks like:

    Code:
    HTML 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>
    <title>Box</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    <!--
    body {
      text-align: center;
      background-color: #ffffff;
    }
    #container {
      width: 437px;
    }
    #top {
      background: url(images/box/top3.png);
      height: 30px;
    }
    #mid {
      background: url(images/box/mid2.png);
    }
    #bot {
      background: url(images/box/bot2.png);
      height: 9px;
    }
    -->
    </style>
    </head>
    <body>
    <div id="container">
      <div id="top"><b>Hello</b></div><BR>
      <div id="mid"><BR><BR><BR><BR><BR></div>
      <div id="bot"></div>
    </div>
    </body>
    </center>
    </html>
    <div id="top"><b>Hello</b></div><BR>
    <div id="mid"><BR><BR><BR><BR><BR></div>
    <div id="bot"></div>

    I bolded it.

  3. #3
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Indeed, he is correct.
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  4. #4
    Join Date
    Jun 2007
    Location
    Leicester
    Posts
    1,607
    Tokens
    0

    Latest Awards:

    Default

    Thanks +Rep

  5. #5
    Join Date
    Aug 2005
    Location
    Newcastle
    Posts
    1,417
    Tokens
    0

    Latest Awards:

    Default

    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>
    <title>Box</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    <!--
    body {
      text-align: center;
      background-color: #ffffff;
    }
    #container {
      width: 437px;
    }
    #top {
      background: url(images/box/top3.png);
      height: 30px;
    }
    #mid {
      background: url(images/box/mid2.png);
      margin-bottom: 20px;
    }
    #bot {
      background: url(images/box/bot2.png);
      height: 9px;
    }
    -->
    </style>
    </head>
    <body>
    <div id="container">
      <div id="top"><b>Hello</b></div>
      <div id="mid"></div>
      <div id="bot"></div>
    </div>
    </body>
    </center>
    </html>
    This is a good attempt, stay away from HTML tags when using xHTML. In CSS there is a tag called margin, it creates a gap instead of using <br />.

    Keep working/posting your xhtml code and I'll be happy to keep pushing you in the right direction.



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

    Latest Awards:

    Default

    Looks good. Try staying away from using <br /> as craigg said, it's not as effective as margin-top: or just a standard margin! Try exploring with margins, it makes life much easier.

Posting Permissions

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