Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6793283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:04:55+00:00 2026-05-26T18:04:55+00:00

I have this horizontal menu. The menu looks like tabs and are 29px high.

  • 0

I have this horizontal menu. The menu looks like tabs and are 29px high. The image is set to <li> background image in CSS. And I set the hover also in CSS.
Now what I want is when we have a mouse over that the image moves upwards with 8px. Now it moves downwards.

CODE:

#nav li {
    float:left;
    list-style:none;
    width:116px;
    height:29px;
    background-image:url(images/nav/nav_btn.png);
    background-repeat:no-repeat;
    padding-right:10px;
    text-align:center;
    padding-top:8px;}

#nav li:hover {
    float:left;
    list-style:none;
    width:116px;
    height:37px;
    background-image:url(images/nav/nav_btn_active.png);
    background-repeat:no-repeat;
    padding-right:10px;
    text-align:center;
    padding-top:8px;
    padding-bottom:-8px;}

<div id="nav">
<ul>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
</ul>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:04:56+00:00Added an answer on May 26, 2026 at 6:04 pm

    Reverse your padding on the li:hover

    padding-top:-8px;
    padding-bottom:8px;
    

    EDIT: NOT! Of course, I don’t know where my brain was when I stated the above. There is no such thing as negative padding. I think this is what you desire:

    #nav li:hover {
        float:left;
        list-style:none;
        width:116px;
        height:37px;
        background-image:url(images/nav/nav_btn_active.png);
        background-repeat:no-repeat;
        padding-right:10px;
        text-align:center;
        padding-top:8px;
        padding-bottom:0px;
        position: relative;
        top: -8px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a horizontal menu on a page like this <link rel=stylesheet type=text/css href=/classified/siteassets/css/mymenu.css
I have a horizontal menu. The markup looks like this: <ul class=menu> <li>Item 1</li>
I have a menu which looks like this: |Home|Options|Settings|Tools|Preferences|Edit| That's fine when a phone
My horizontal navigation bar looks like this: | MENU-ITEM 1 | MENU-ITEM-2 | MENU-ITEM
I have this CSS menu: http://jsfiddle.net/7JC8t/ If you hover your mouse over 'inostranstvo' you
My CSS looks like this: #menu { width: 1024px; height: 25px; margin: 0 auto;
I have a css horizontal menu with a menu / submenu display working on
I've been unable to center this horizontal list drop down menu. Will I have
I have a header for the page with horizontal menu navigation like A B
My web site has a common horizontal menu and I'd like to put this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.