Results 1 to 9 of 9

Thread: css problem

  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default css problem

    I am currently having a problem with a navigation.
    With 3 divs in a row
    Left|Mid|Right

    The only problem is, the right is merging with the mid, and the left isn't displaying at all (or could be behind the mid).

    My full code is:
    HTML Code:
    <html>
    <head>
    <style>
    body {
        background:#FFFFFF url('images/bg.gif') repeat-x fixed; margin-top:0px;
        background-possision:top;    
    }
    .container {
        width:960px;
        margin:auto;
    }
    .header {
        background-image: url(images/bg.gif);
        background-repeat: repeat-x;
        height: 100px;
        width:960px;
        color:#6E97C5;
    }
    .nav_contain {
        height:51px;
        width:960px;
    }
    .nav_left {
        float:left;
        height:51px;
        width:15px;
        background-image: url(images/nav-left.gif);
        background-repeat: no-repeat;
    }
    .nav_mid {
        float:left;
        height:51px;
        width:930px;
        color:#FFFFFF;
        background-image: url(images/nav-mid.gif);
        background-repeat: repeat-x;
    }
    .nav_right {
        float:right;
        height:51px;
        width:15px;
        background-image: url(images/nav-right.gif);
        background-repeat: no-repeat;
    }
    .menu_item {
        float: left;
        position: relative;
        padding-top:15px;
        margin-right: 20px;
        font-weight:bold;
    }
    
    </style>
    </head>
    <body>
    <div class="container">
    <div class="header"></div>
    <div class="nav_contain">
    <div class="nav_left"><div>
    <div class="nav_mid">
    <div class="menu_item">HOME</div>
    <div class="menu_item">IMAGES</div>
    <div class="menu_item">VIDEOS</div>
    <div class="nav_right"><div>
    </div>
    </div>
    </body>
    </html>
    Thanks.

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

    Latest Awards:

    Default

    In your nav_container, just make that float left, anything under that remove floateft; from as they will just sit under that container.

  3. #3
    Join Date
    Dec 2006
    Posts
    7,601
    Tokens
    95

    Latest Awards:

    Default

    ok try changing the nav right to float: left and also, just ensure you have the correct image for the left one.

  4. #4
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    In your nav_container, just make that float left, anything under that remove floateft; from as they will just sit under that container.
    Didn't change anything.

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

    Latest Awards:

    Default

    Quote Originally Posted by Jack120 View Post
    Didn't change anything.
    Can you show us an image of whats what?

  6. #6
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    This 1s in Tables
    http://v-habbo.com/superfail/layout.htm

    This 1s in divs
    http://v-habbo.com/superfail/layout_div.htm

    I want the divs to look like the tables one

  7. #7
    Join Date
    Dec 2006
    Posts
    7,601
    Tokens
    95

    Latest Awards:

    Default

    oh wait, you have left out a </div>...

    put it after: "<div class="menu_item">VIDEOS</div>"

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

    Latest Awards:

    Default

    Quote Originally Posted by kk. View Post
    oh wait, you have left out a </div>...

    put it after: "<div class="menu_item">VIDEOS</div>"
    Shows how I never check code doesn't it

  9. #9
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Excellent View Post
    Shows how I never check code doesn't it
    Ah yea.
    I added a div, it shows the right now, but just in the wrong place.
    Ill just have to fix that.
    http://v-habbo.com/superfail/layout_div.htm

    Edit: I just re-did the nav and it works now
    Last edited by Moh; 18-06-2008 at 01:49 PM.

Posting Permissions

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