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 20
  1. #1
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default Rollover Problems (CSS + DIVS)

    Hey,
    I'm coding a layout. I want to do rollovers on the layout.
    But when I sliced the layout, I only sliced 1px width of the navigation, so it could expand 100% on your screen.

    But when I want to create a rollover, it rolls-over the whole navigation.
    How can I do different rollovers in that navigation?
    Like:
    Orange = Normal image
    Red = Hover image
    lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll

    +rep
    Last edited by Meti; 05-09-2008 at 06:48 PM.

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

    Latest Awards:

    Default

    .button {
    background-image: url(blah);
    width: blahpx;
    height: blahpx;
    }
    .button:hover {
    background-image: url(blah);
    width: blahpx;
    height: blahpx;
    }

  3. #3
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    Already sorted this

    .nav a {
    background-image: url(images/nav_normal.png);
    background-repeat: repeat-x;
    width: 1px;
    height: 44px;
    }
    .nav a:hover {
    background-image: url(images/nav_hoverl.png);
    background-repeat: repeat-x;
    width: 1px;
    height: 44px;
    }

    then
    <div class="nav">Then links here</div>

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

    Latest Awards:

    Default

    That works, but then the div will change colour, but they might not be on the actual text link.

    It's better to style the actual text so when they hover over the section it is actually an active link not just a div that is changing colour.


  5. #5
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    Doesn't work for me
    www.stockholm.se >> They have the same navigation I want, the blue one..

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

    Latest Awards:

    Default

    Code:
    #nav {
    width: whatever px;
    height: whatever px;
    background: url('whatever.png') repeat-x;
    margin: 0;
    padding: top 0px bottom 0px;
    text-align: center;
    }
    #nav a {
    color: white;
    text-decoration: none;
    }
    #nav a:hover {
    color: white;
    text-decoration: underline;
    }
    That it?


  7. #7
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    I don't want it to roll-over the text. I want image backgrounds of the rollovers.

  8. #8
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Meti View Post
    I don't want it to roll-over the text. I want image backgrounds of the rollovers.
    :S? Just use what I gave you but type inside it..

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

    Latest Awards:

    Default

    You gave me that site as an example and that's what their menu does :S.

    But yeah just follow excellent's instructions.


  10. #10
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    I've tried Excellents instructions. I already knew that code, but it doesn't work. I don't think you understand me.
    It's a 1px width navigation, and i added 100% width, so it's the whole screen.
    But when i do hover, it hovers the whole navigation..
    --
    And L?KE, I meant when you click their navigation

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
  •