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 8 of 8
  1. #1
    Join Date
    Dec 2007
    Location
    Toronto, Ontario, Canada
    Posts
    689
    Tokens
    0

    Default onoes. I'm rusty.

    Well, I haven't coded in who knows how long. Basically, I'm coding a layout for a new script I'm creating.

    It's all going well, but then this happens. Instead of the DIVs (for the content box) each going under each other, they go in a line sideways.

    Here's the CSS for the navigation boxes:
    HTML Code:
    #ntop {
    background-image: url(images/navtop.gif);
    width: 197px;
    height: 40px;
    float: left;
    margin-top: 20px;
    }
     
    #nmid {
    background-image: url(images/navmid.gif);
    width: 197px;
    float: left;
    }
     
    #nbot {
    background-image: url(images/navbot.gif);
    width: 197px;
    height: 10px;
    float: left;
    }
    Here's how I have the DIV HTML code in my body:

    HTML Code:
    <div id="ntop"></div>
    <div id="nmid"></div>
    <div id="nbot"></div>
    Moved by Agesilaus (Forum Moderator) from Design and Development: Please post in the correct forum.
    Last edited by Agesilaus; 19-12-2007 at 02:56 PM.

  2. #2
    Join Date
    Sep 2006
    Location
    Doncaster, UK
    Posts
    4,081
    Tokens
    0

    Latest Awards:

    Default

    Line break.
    Quote Originally Posted by Nain View Post
    i voted 'Not Sure' as im, not sure!

  3. #3
    Join Date
    Dec 2007
    Location
    Toronto, Ontario, Canada
    Posts
    689
    Tokens
    0

    Default

    Quote Originally Posted by Aflux View Post
    Line break.
    I now have this:
    HTML Code:
    <div id="ntop"></div><br />
    <div id="nmid"></div><br />
    <div id="nbot"></div><br />
    Only the DIVs "navbot & navmid" are together, they aren't connected with navtop.

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

    Latest Awards:

    Default

    So instead of them being like;
    [------] [------] [------]
    You want them to be like:
    [------]
    [------]
    [------]
    ? If so, remove the float attribute..

  5. #5
    Join Date
    Dec 2007
    Location
    Toronto, Ontario, Canada
    Posts
    689
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    So instead of them being like;


    You want them to be like:


    ? If so, remove the float attribute..
    If I remove the float attribute, they don't stay to the left? Or would I create a wrap for them?

  6. #6
    Join Date
    Dec 2007
    Posts
    412
    Tokens
    0

    Default

    Quote Originally Posted by loserWILL View Post
    If I remove the float attribute, they don't stay to the left? Or would I create a wrap for them?
    They will stay to the left.

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

    Latest Awards:

    Default

    If you want them in a colomn rather than a row, yes you would use a "wrap" or as I call them, a container. Set the width of the container and insert the divs inside the container.

    Hope that helped.



  8. #8
    Join Date
    Dec 2007
    Location
    Toronto, Ontario, Canada
    Posts
    689
    Tokens
    0

    Default

    Okay, thanks everybody +rep.

Posting Permissions

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