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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:22:10+00:00 2026-06-16T00:22:10+00:00

this is my first post to stackoverflow, but I use you guys knowledge constantly,

  • 0

this is my first post to stackoverflow, but I use you guys knowledge constantly, so thanks!

I’m having an issue with menu alignment. I have a wordpress menu that I added divs inside the li element so that I could have a first/middle/last componant for each menu. This is so that I can have the current menu state raised up with the first and last items being “endcaps”. Hard to explain, you can see it here: http://clarksvillevet.com/new/

Notice how the middle of the current menu item “sinks”? I cannot figure out what I’m missing here. I thought it was the line height, but that only moves it a bit. I’m guessing something is overlapping on the css (kinda calling it twice if you know what I mean), but again, no idea. Here is the HTML generated:

<div id="main-menu">
<ul id="menu-main-menu" class="menu">
<li id="menu-item-8" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8">
<li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-9 current_page_item menu-item-23">
<div class="first"></div>
<div class="middle">
<a href="http://clarksvillevet.com/new/about-southside-va-veterinary-hospital/" title="About Southside Virginia’s Best Veterinary Hospital">About</a>
</div>
<div class="last"></div>
</li>
<li id="menu-item-20" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20">
<li id="menu-item-50" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-50">
<li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56">
<li id="menu-item-62" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-62">
</ul>
</div>

And the CSS

#main-menu{
width: 598px;
height: 51px;
margin: -6px 0px 0px;
z-index:401;
float: left;
background:url('images/BG-Menu.png') no-repeat top left transparent;
}

.menu {
list-style-type:none;
list-style-position:outside;
list-style-image:none;
position:relative;
z-index:300;
width: 598px;
height: 51px;
float: left;
line-height: 57px;
}

.menu ul{
position:absolute;
line-height: 57px;
overflow:hidden;
margin:0px;
padding:0px;
top: 51px;
left:0px;
display: none;
list-style-position:outside;
}

.menu a {
display:block;
display:inline-block;
padding:0px;
text-decoration:none;
letter-spacing: 1px;
font-size: 13px;
color: #dddddd;
margin: 0px;
}

.menu .first, .menu .middle, .menu .last {
position: relative;
padding:0px;
display: inline-block
}

.menu .first, .menu .last{
width: 11px;
height: 51px;
margin: 0px;
padding: 0px;
}

.menu .middle {
height:51px;
margin: 0px;
padding: 0px;
}

.menu a:hover {
color:#ffffff;
background-color:transparent;
}

.menu li {
float:left;
position:relative;
}


.menu ul a:hover {
color:#ffffff;
}

.menu li ul a {
width: 250px;
height: 32px;
float:left;
line-height: 30px;
background: url('images/BG-Drop-Menu.png') no-repeat top left transparent;
padding: 0px 0px 0px 20px;
color: #ffffff;
}

.menu li ul a:hover{
background: url('images/BG-Drop-Menu-Hover.png') no-repeat top left transparent;
}

.menu li ul ul {
left:0em;
margin:0px 0 0 10px;
}

.menu li:hover ul ul, .menu li:hover ul ul ul, .menu li:hover ul ul ul ul {
display:none;
}

.menu li:hover ul, .menu li li:hover ul, .menu li li li:hover ul, .menu li li li li:hover ul{
display:block;
}

.current-menu-item .first{
background:url('images/BG-Menu-Current-A.png') no-repeat top left transparent;
}

.current-menu-item .middle{
background:url('images/BG-Menu-Current-B.png') repeat-x top left transparent;
}

.current-menu-item .last{
background:url('images/BG-Menu-Current-C.png') no-repeat top left transparent;
}

.current-menu-item{
line-height: 51px;
}

There is also a dropdown menu, so when you see the .menu ul display:none , that is what its for… Feel free to correct any craziness you may see! Thanks!

  • 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-16T00:22:11+00:00Added an answer on June 16, 2026 at 12:22 am

    All of the child divs are inline-blocks. When this happens, line-height will be applied if it contains text. To fix this, you need to float the divs as done below.

    .menu ul > div { float: left }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Frequent visitor but first post here on StackOverflow, I'm hoping that you guys might
Found this related post, https://stackoverflow.com/questions/7139/should-a-first-release-be-an-0-1-version-or-1-0b , but it is not about Ruby Gems. I
this is my first post on StackOverflow, I have read a lot of pages
this is my first post to stackoverflow, but I've used this amazing site before.
First of all, this is my first post in stackoverflow. I use this side
First, I must say that I have read several post about this at StackOverflow
This is my first post on stackoverflow, so please excuse me if my question
This is my first post in stackoverflow. I want to improve its google pagerank
this is my first post here on stackoverflow and am very impressed by the
This is my first post and I my first experience with jquery. I have

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.