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 9096739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:55:46+00:00 2026-06-16T23:55:46+00:00

I am creating a menu which I am trying to base on this menu:

  • 0

I am creating a menu which I am trying to base on this menu:

http://www.yootheme.com/widgetkit

However I have run into a small problem where if you hover over the middle of the menu item, it works ok, but if you hover over the edge of it (where the border line is), it moves itself and the other menu items in front of it to the right by 1px.

I have been messing around with the code for a fair amount of time now and can’t seem to figure it out.

HTML:

<div class="nav">
    <ul>
        <li><a href="index.html">Home</a></li>
        <li class="active"><a href="index.html">Structure</a></li>
        <li><a href="index.html">Buttons</a></li>
        <li><a href="index.html">Forms</a></li>
        <li><a href="index.html">Download</a></li>
    </ul>
</div>

CSS:

.nav {
    max-width: 100%;
}
.nav ul {
    max-width: 100%;
    margin: 0 auto;
    background: #FFFFFF;
    background: -webkit-linear-gradient(top, #FFFFFF 1%, #F5F6F6 100%);
    background: -moz-linear-gradient(top, #FFFFFF 1%, #F5F6F6 100%);
    background: -ms-linear-gradient(top, #FFFFFF 1%, #F5F6F6 100%);
    background: -o-linear-gradient(top, #FFFFFF 1%, #F5F6F6 100%);
    background: linear-gradient(top, #FFFFFF 1%, #F5F6F6 100%); 
    background-attachment: scroll;
    background-clip: border-box;
    background-origin: padding-box;
    background-position: 0 0;
    background-repeat: repeat-x;
    background-size: 100% 100%;
    border: 1px solid #c8c9ca;
    border-radius: 6px 6px 6px 6px;
    height: 40px;
}
.nav ul li {
    margin-top: -1px;
    padding-top: 1px;
    float: left;
    height: 39px;
    list-style: none outside none;
}
.nav ul li:first-child {
    border-left: none;
}
.nav ul li.active{
    border-left: 1px solid #DCDDDE;
    border-right: 1px solid #DCDDDE;
    padding-top: 1px;
    float: left;
    list-style: none outside none;
    background: -webkit-linear-gradient(center top , #F7F8F9 0%, #FBFCFD 15%, #FEFEFE 100%);
    background: -moz-linear-gradient(center top , #F7F8F9 0%, #FBFCFD 15%, #FEFEFE 100%);
    background: -ms-linear-gradient(center top , #F7F8F9 0%, #FBFCFD 15%, #FEFEFE 100%);
    background: -o-linear-gradient(center top , #F7F8F9 0%, #FBFCFD 15%, #FEFEFE 100%);
    background: linear-gradient(center top , #F7F8F9 0%, #FBFCFD 15%, #FEFEFE 100%);
    border-left: 1px solid #DCDDDE;
    border-top: 1px solid #D2D3D4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
    color: #000000;
}
.nav ul li.active:hover{
    padding-left: 1px;
    padding-right: 1px;
}
.nav ul li:hover{
    border-right: 1px solid #DCDDDE;
    border-left: 1px solid #DCDDDE;
    border-top: 1px solid #D2D3D4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
    color: #000000;
}
.nav ul li a {
    float: left;
    text-decoration: none;
    display: block;
    font-family: 'YanoneKaffeesatzLight', Arial, sans-serif;
    height: 38px;
    line-height: 38px;
    padding-left: 22px;
    padding-right: 22px;
    display: block;
    color: #444444;
    font-size: 17px;
    text-shadow: 0 1px 0 #FFFFFF;
}
.nav ul li a:hover{
    padding-left: 21px;
    padding-right: 21px;
}

I have also made a JSFiddle for a proper preview.

Can anyone help me figure out why this is happening and provide a possible solution? It’s probably something stupid I’m not seeing.

  • 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-06-16T23:55:47+00:00Added an answer on June 16, 2026 at 11:55 pm

    That’s because you put borders on LI:HOVER and after that you change the padding on A:HOVER not on LI:HOVER again. Just change the place of :hover like this:

    .nav ul li:hover a{
        padding-left: 21px;
        padding-right: 21px;
    }
    

    And I think it should be fine now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

website: http://www.telugumovieshub.com/ I followed this tutorial here (except for creating a child theme): http://50dollarblogs.net/wordpress-menus-support/
I'm creating a CSS drop down menu which is going well so far, however
I am creating a menu that will have its menu items injected into it
I have spent the last 3 days creating a menu structure which is generated
I am creating a menu system using a UL/LI structure. I'm trying to use
I'm creating several menu items programmatically like this : NSMenuItem* newItem = [[NSMenuItem alloc]
I am creating a menu and for each menu component, I have a specific
I'm trying to make dynamic menu using xml data, I'm creating that menu using
I am creating a menu in Android and I would like this menu to
[EDIT: Here's a link to a mockup of what I'm trying to create] http://i53.tinypic.com/w9v2np.jpg

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.