I need to get my navigation menu centered.
You can see my current menu at:
www.financialconsultingcareers.com
Here is the code:
#hor_nav
{
width: 100%;
color: #000000;
background: #f1f1f1;
font-size: 20px;
font-family: helvetica;
font-weight: bold;
height: 32px;
z-index: 1000;
Margin-top: -25px;
border-bottom: 5px solid #254117;
box-shadow: 0px 5px 5px #888888;
margin-bottom: 25px;
text-align: center;
}
#hor_nav UL
{
margin: 0;
}
#hor_nav LI
{
list-style: none;
display: center;
float: left;
margin-left: 3px;
padding: 0;
height: 32px;
position: relative;
text-transform: capitalize;
text-align: justify;
border-right: 1px solid #000001;
<!--left: 2.5%;-->
}
div.#hor_nav, ul.#hor_nav li.active a
{
border-radius: 5px 5px 0 0;
margin-right: 3px;
}
#hor_nav LI A
{
display: inline-block;
padding: 0 18px;
line-height: 32px;
margin-right: 3px;
color: #000;
font-weight: normal;
font-size: 100%;
text-decoration: none;
border-radius: 5px 5px 0 0;
text-align: justify;
}
#hor_nav LI.active A
{
border-radius: 4px 4px 0 0;
background-color: #254117;
color: #FFFFFF;
font-weight: normal;
padding-bottom: 4px;
margin-top: -4px;
}
#hor_nav li:last-child
{
border-right: none;
}
#hor_nav LI A:hover,
#hor_nav LI:hover A,
#hor_nav LI.sfHover A
{
background: #828282;
color: #FFF;
text-decoration: none;
border-radius: 5px 5px 0 0;
padding-bottom: 4px;
margin-top: -4px;
}
#hor_nav LI UL
{
position: absolute;
width: auto;
left: -999em;
margin-left: -4px;
border-radius: 5px 5px 0 0;
}
#hor_nav LI UL UL
{
margin: -31px 0 0 170px;
border-radius: 5px 5px 0px 0px;
}
#hor_nav LI:hover UL UL,
#hor_nav LI:hover UL UL UL,
#hor_nav LI:hover UL UL UL UL,
#hor_nav LI.sfHover UL UL,
#hor_nav LI.sfHover UL UL UL,
#hor_nav LI.sfHover UL UL UL UL
{
left: -999em;
}
#hor_nav LI LI
{
margin-left: -20px;
padding: 0;
font-size: 80%;
height: auto;
text-align: justify;
background: #CCC;
width: 225px;
border-radius: 0 0 0 0;
box-shadow: 0px 3px 3px #888888;
}
#hor_navLI LI A,
#hor_nav LI LI.active A,
#hor_nav LI LI A:hover
{
margin: 0;
height: 30px;
line-height: 30px;
background: #828282;
color: #FFF;
border-radius: 5px 5px 5px 5px;
}
#hor_nav LI LI A,
#hor_nav LI.active LI A
{
font-weight: normal;
border-radius: 5px 5px 0 0;
}
#hor_nav LI:hover UL,
#hor_nav LI.sfHover UL
{
left: 4px;
}
#hor_nav LI LI:hover UL,
#hor_nav LI LI LI:hover UL,
#hor_nav LI LI LI LI:hover UL,
#hor_nav LI LI.sfHover UL,
#hor_nav LI LI LI.sfHover UL,
#hor_nav LI LI LI LI.sfHover UL
{
left: 0;
}
#hor_nav LI
{
list-style: none;
}
It does not solve everything, but if you add a fixed width (say, width: 700px) to the <ul class="hor_nav">, the menu is centered (however, the background does not persist through the full width of the page, but you have to set the background to a different element in order to support that).
You must specify a fixed width in order for margin-left: auto and margin-right: auto to center the element.
There is no such thing as position: center. You can drop that one.
By the way, I notice the top logo is shrunk when you resize the page. Beware. ;)
If you want to center your navigation menu, you need to set a fixed width value to your UL. This is going to change how you implement your design though. So you may need to use the parent div in order to apply your border and background colors.
You have to specify a certain width. 100% would not work...
Example:
#hor_nav {
width: 500px;
margin: 0 auto;
The margin: 0 auto will centre it dead on but it will only work if you have a certain width applied to your element.
Related
I realize this question has been asked over and over again, but I simply cannot figure out how to fix the problem. I'd like to center my drop-down navigation bar, the headers or main elements, not the child elements.
Here's the JSFiddle link :
http://jsfiddle.net/02zoptrf/3/
#mbwnavbar {
background: #ffffff;
width: 800px;
color: #000000;
margin: 0 auto;
padding: 0;
position: relative;
border-top:0px solid #transparent;
height:35px;
}
#mbwnav {
text-align: center
margin: 0 auto;
padding: 0;
}
#mbwnav ul {
float: left;
list-style: none;
margin: 0 auto;
padding: 0;
}
#mbwnav li {
list-style: none;
margin: 0 auto;
padding: 0;
display:inline;
border-left:0px solid #333;
border-right:0px solid #333;
height: 35px;
}
#mbwnav li a, #mbwnav li a:link, #mbwnav li a:visited {
color: #000000;
display: inline-block;
font:normal 11px Century Gothic, sans-serif; margin: 0;
font-weight: bold;
text-align: left;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
#mbwnav li a:hover, #mbwnav li a:active {
background: #ffffff;
color: #fdeae9;
display: block;
text-decoration: none;
margin: 0 auto;
padding: 9px 12px 10px 12px;
}
#mbwnav li {
float: left;
padding: 0;
}
#mbwnav li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: auto;
width: 100px;
margin: 0 auto;
padding: 0;
}
#mbwnav li ul a {
width: 100px;
}
#mbwnav li ul ul {
margin: -25px 0 0 161px;
}
#mbwnav li:hover ul ul, #mbwnav li:hover ul ul ul, #mbwnav li.sfhover ul ul, #mbwnav li.sfhover ul ul ul {
left: -999em;
}
#mbwnav li:hover ul, #mbwnav li li:hover ul, #mbwnav li li li:hover ul, #mbwnav li.sfhover ul, #mbwnav li li.sfhover ul, #mbwnav li li li.sfhover ul {
left: auto;
}
#mbwnav li:hover, #mbwnav li.sfhover {
position: static;
}
#mbwnav li li a, #mbwnav li li a:link, #mbwnav li li a:visited {
background: #ffffff;
width: 120px;
color: #000000;
display: block;
font:normal 11px Century Gothic, sans-serif;
margin: 0 auto;
padding: 9px 12px 10px 12px;
text-decoration: none;
z-index:9999;
border-bottom:0px dotted #333;
}
#mbwnav li li a:hover, #mbwnavli li a:active {
background: #ffffff;
color: #fdeae9;
display: block; margin: 0 auto;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
Anyone have any ideas? Sorry for being such a bother, I realize this question is quite popular, but I've spent a few days working on this and I can't figure anything out.
Thank you!
An easy way to do this is with display: table on the container. Here's a demo, with some minor tweaks just to your CSS:
http://codepen.io/pageaffairs/pen/zvJmG
Try moving the text-align: center to #mbwnavbar and add display: inline-block to #mbwnav. text-align: center can center inline-blocks.
Example:
http://codepen.io/anon/pen/DGtfo
http://jsfiddle.net/VerdeletG/02zoptrf/7/
#mbwnav {
margin:auto;
display:table;
}
display table works extremely well with margin auto. I tweaked your code and removed unecessary lines as well while I was at it! hope it works!!!
I have been trying to fix this issue with the text not centering on Chrome mobile browsers and I have an answer and it worked after trying EVERYTHING!
"text-align:center;" does not work)
You dont need all that ridiculous code
Try this:
On a dropdown (select) CSS code the element with this
text-align-last: center;
All my dropdowns are now centered. I guess that code works because the browser is looking at the previous span but who knows it works!
I've created a drop down menu using css where the drop down appears as a horizontal row instead of a vertical list. My only problem is that the drop down menu does not line up with the rest of menu. I want it to be flush with the left side of the navigation bar.
The page is up at this address: http://concept82.com/CBHweb/index2.html
The code for my drop down menu is:
#navholder{
background-color: #594361;
margin: 0 auto;
width: 868px;
height: 25px;
font-family: P22, Helvetica, Arial, sans-serif;
}
#nav {
margin: 1px;
padding: 0px;
}
#nav li {
list-style: none;
float: left;
}
#nav li a {
display: block;
color: #FFFFFF;
font-size: 14px;
text-align: center;
margin-top: 5px;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 3px;
width: 140px;
}
#nav li a:hover {
color: #201E30;
}
#nav li ul {
display: none;
}
#nav li ul a{
width: auto;
font-size: 11px;
}
#nav li:hover ul, #nav li.hover ul {
position: absolute;
left: 0;
display: inline;
padding-top: 5px;
}
#nav li:hover li, #nav li.hover li {
float: left;
display: block;
text-decoration: none;
color: #594361;
font-size: 11px;
border-right: 1px solid #594361;
padding: 0px 15px 0px 15px;
margin-top: 3px;
margin-bottom: 3px;
white-space: nowrap;
}
#nav li.first, #nav li.hover li.first {
float: left;
display: block;
text-decoration: none;
color: #594361;
font-size: 11px;
border-left: 1px solid #594361;
padding: 2px 15px 2px 5px;
margin-top: 3px;
white-space: nowrap;
}
#nav li:hover li a, #nav li.hover li a {
color: #201E30;
background-color: #FFFFFF;
}
#nav li li a:hover {
color: #201E30;
}
Thanks ahead of time!
You should change position of #navholder as relative.
#navholder{
position: relative;
background-color: #594361;
margin: 0 auto;
width: 868px;
height: 25px;
font-family: P22, Helvetica, Arial, sans-serif;
}
When you define the ul when hovering on the list you specify left as 0 px, aligining it to the left of the page, change it to your margin width then it will be in the right place
#nav li:hover ul, #nav li.hover ul {
position: absolute;
left: 0;
display: inline;
padding-top: 5px;
}
I'm pretty sure this is an easy fix and I am simply too in experienced to figure it out. I'm building a site, using WP, but the home page is simply a background image with a vertical nav menu. I don't now how to make the menu stay in the same place for all browsers and windows. It looked good on my screen, then I found the nav pane was in a completely different place on my husband's monitor. I believe it has to do with position and display and margins, but I am getting more lost as I read up on these and I just want someone to tell me the code.
The page is at www.sydneyjanebaily.com
So far the code for the whole page is as follows:
body {
background-image:url(http://www.sydneyjanebaily.com/wp-content/themes/twentyeleven/images/open-book.png);
background-repeat:no-repeat; background-attachment:fixed;
background-position:center;
}
menu { display: block; }
access div { display: block; margin-left:890px; margin-right:auto; margin-top:200px; width: 235px; }
/************* Navigation **********/
nav#access ul, nav#access li.pagenav { display: block; list-style:
none; }
nav#access ul li a span, nav#access ul li.page_item a span { position:
absolute; right: 100%; top: 2px; width: 15px; height: 100%;
background-image: url(../images/nav-shadow.png); background-position:
right top; background-repeat: repeat-y; }
nav#access ul li a, nav#access ul li a:visited, nav#access ul
li.page_item a, nav#access ul li.page_item a:visited { display:
block; padding: 8px 10px 8px 30px; color: white; font: 150%
"EBGaramondSC", "Palatino", "Palatino Linotype","Book Antiqua",
Georgia, serif; text-decoration: none; /*background-color:
aba000; */ margin: 5px 0 7px 0; position: relative; width: 235px; /font-variant: small-caps;/ }
nav#access ul li a:hover, nav#access ul li a:focus, nav#access ul
li.page_item a:hover, nav#access ul li.page_item a:focus{ color:
FF0000; }
nav#access li a:hover span { background-color: #666; } nav#access ul
li a em { font-size: 87.50%; } nav#access ul li:nth-child(5n-4) a,
nav#access ul li:nth-child(5n-4) a span { ; } nav#access ul
li:nth-child(5n-3) a, nav#access ul li:nth-child(5n-3) a span { ; }
nav#access ul li:nth-child(5n-2) a, nav#access ul li:nth-child(5n-2) a
span { ; } nav#access ul li:nth-child(5n-1) a, nav#access ul
li:nth-child(5n-1) a span { ; } nav#access ul li:nth-child(5n-5) a,
nav#access ul li:nth-child(5n-5) a span {; } -->
nav#access ul li ul li span { position: absolute; right: 100%; top: 0;
width: 20px; height: 100%; left: 2px; margin-right: 15px; overflow:
visible; } nav#access ul li ul li:nth-child(odd) a { background:
none; color: #EEE8AA; font-size: smaller; margin: 3px 20px 5px 20px;
min-height: 20px; width: 210px; padding: 2px 0 2px 20px; } nav#access
ul li ul li:nth-child(odd) a:hover, nav#access ul li ul
li:nth-child(odd) a:focus { background: none; color: #ADFF2F;
font-size: smaller; left: 15px; padding: 2px 30px 2px 25px; }
nav#access ul li ul li:nth-child(odd) a span { background:
url(../images/sub-menu2.png) -5px 0px no-repeat; width: 30px; }
nav#access ul li ul li:nth-child(even) a { background: none; color:
3B3C1D; font-size: smaller; margin: 3px 20px 5px 20px; min-height: 20px; width: 210px; padding: 2px 0 2px 20px; } nav#access ul li ul
li:nth-child(even) a:hover, nav#access ul li ul li:nth-child(even)
a:focus { background: none; color: #FF4500; font-size: smaller; left:
15px; padding: 2px 30px 2px 25px; } nav#access ul li ul
li:nth-child(even) a span { background: url(../images/sub-menu2.png)
-5px 0px no-repeat; width: 30px; }
nav#access ul li ul li ul li:nth-child(odd) a { background: none;
color: #FFD700; font-size: smaller; margin: 3px 20px 5px 30px;
min-height: 20px; width: 200px; padding: 2px 0 2px 20px; } nav#access
ul li ul li ul li:nth-child(odd) a:hover, nav#access ul li ul li ul
li:nth-child(odd) a:focus { background: none; color: #EEE8AA;
font-size: smaller; left: 25px; padding: 2px 30px 2px 25px; }
nav#access ul li ul li ul li:nth-child(odd) a span { background:
url(../images/sub-menu.png) -10px 0px no-repeat; width: 30px; }
nav#access ul li ul li ul li:nth-child(even) a { background: none;
color: #3B3C1D; font-size: smaller; margin: 3px 20px 5px 30px;
min-height: 20px; width: 200px; padding: 2px 0 2px 20px; } nav#access
ul li ul li ul li:nth-child(even) a:hover, nav#access ul li ul li ul
li:nth-child(even) a:focus { background: none; color: #7FFFD4;
font-size: smaller; left: 25px; padding: 2px 30px 2px 25px; }
nav#access ul li ul li ul li:nth-child(even) a span { background:
url(../images/sub-menu.png) -10px 0px no-repeat; width: 30px; }
nav#access ul li a:hover:active, nav#access ul li ul li
a:hover:active, nav#access ul li ul li ul li a:hover:active,
nav#access ul li a:focus:active, nav#access ul li ul li
a:focus:active, nav#access ul li ul li ul li a:focus:active { color:
00CCFF; left: 1px; top: 1px;}
/* Singular navigation */
nav-single { float: right; position: relative; top: -0.3em; text-align: right; z-index: 1; }
nav-single .nav-previous,
nav-single .nav-next { float: none; width: auto; }
nav-single .nav-next { padding-left: .5em; }
img.book {
/* Set rules to fill background */
min-height: 100%;
min-width: 1000px;
/* Set up proportionate scaling */
height: auto;
/* Set up positioning */
top: 0;
left: 0;
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
}
</style>
<!-- <img class="book"src="<?php bloginfo('template_directory');?>/images/open-book.png" alt="xxx"
width="880" height="xxx" /> -->
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
<!-- <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content',
'twentyeleven' ); ?>">
"> -->
'primary' ) ); ?>
I am puzzled that when I inspect an element using Firefox developer tool, it still says inline element for things I've marked as block.
Basically, I can put the nav pane where I want using px but it only looks right on my screen. I think I need percentages, but that is beyond me. Please help.
Thanks,
Sydney
Try replacing this:
#access div {
display: block;
margin-left:890px;
margin-right:auto;
margin-top:200px;
width: 235px;
}
with this:
#access div {
position: absolute;
top: 20%;
left: 50%;
}
It works well on my monitor no matter how I squash or stretch the screen, and it should work for you as well. Good luck!
I have some pretty good experince coding my own UL's but I'm relatively new to wordpress. Confusing to me to work backwards especially when I can't see the html. Anyway I'm using the cufon WP plugin to change the font in the menu. but....with the size I want the font, it shrinks the list item as well as the a:hover. There is somehting in the padding i presume, but I can't find it. you can see what I mean here http://www.thedailyminx.com
here is the menu's css
#navbar {
float: left;
display: block;
background: #bfbcc6;
color: #000000;
width: 978px;
height: 30px;
font-size: 25px;
font-family: 'jc-hand';
margin: 15px auto 15px;
padding: 0px 0px 0px 0px;
border: 1px solid #DDDDDD;
position: relative;
z-index: 9;
}
/*** ESSENTIAL STYLES ***/
.menu, .menu * {
margin: 0;
padding: 0;
list-style: none;
}
.menu {
line-height: 1.0;
}
.menu ul {
margin: 0px;
padding: 0px;
}
.menu ul ul, ul.menu ul {
position: absolute;
top: -9999px;
width: 160px; /* left offset of submenus need to match (see below) */
}
.menu ul li ul li, ul.menu ul li {
width: 100%;
margin: 0px 0px 0px 0px;
}
.menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.menu li {
float: left;
display: inline-block;
position: relative;
}
.menu a {
display: inline-block;
position: relative;
}
.menu li:hover ul,
.menu li.sfHover ul {
left: 0;
top: 30px; /* match top ul list item height */
z-index: 99;
}
ul.menu li:hover li ul,
ul.menu li.sfHover li ul {
top: -9999px;
}
ul.menu li li:hover ul,
ul.menu li li.sfHover ul {
left: 160px; /* match ul width */
top: 0;
}
ul.menu li li:hover li ul,
ul.menu li li.sfHover li ul {
top: -9999px;
}
ul.menu li li li:hover ul,
ul.menu li li li.sfHover ul {
left: 160px; /* match ul width */
top: 0;
}
/*** SKIN ***/
.menu .current_page_item a,
.menu .current_page_ancestor a,
.menu .current-menu-item a,
.menu .current-cat a {
background: #333333;
color: #FFFFFF;
border-left: 1px solid #333333;
border-right: 1px solid #333333;
}
.menu li .current_page_item a, .menu li .current_page_item a:hover,
.menu li .current-menu-item a, .menu li .current-menu-item a:hover,
.menu li .current-cat a, .menu li .current-cat a:hover {
background: #333333 !important;
color: #FFFFFF !important;
border-left: none;
border-right: none;
}
.menu {
float: left;
margin-bottom: 0;
}
.menu a {
color: #000000;
background: none;
margin: 0px 0px 0px 0px;
padding: 0px 12px 0px 12px;
text-decoration: none;
letter-spacing: 0.1px;
line-height: 30px;
border-right: 1px solid #DDDDDD;
border-left: 1px solid #FFFFFF;
}
.menu li li a {
display: block;
background: #F5F5F5 !important;
color: #000000 !important;
margin: 0px 0px 0px 0px;
padding: 0px 10px 0px 10px;
font-size: 25px;
line-height: 30px;
text-decoration: none;
text-transform: none;
text-shadow: none;
letter-spacing: 0px;
border-right: none !important;
border-left: none !important;
}
.menu li, .menu li li, .menu li li li {
background: none;
margin: 0px;
padding: 0px;
}
.menu li:hover, .menu li.sfHover {
margin: 0px;
padding: 0px;
}
.menu a:focus, .menu a:hover, .menu a:active {
background: #333333;
color: #FFFFFF;
border-right: 1px solid #333333;
border-left: 1px solid #333333;
outline: 0;
}
.menu li li:hover, .menu li li.sfHover {
margin: 0px;
padding: 0px;
}
.menu li li a:focus, .menu li li a:hover, .menu li li a:active {
background: #EEEEEE !important;
color: #333333 !important;
border: none;
outline: 0;
}
can anyone help me out?
Thanks
Greg
ditch the inline height styling of cufon and set it in your stylesheet to 30px
Long time lurker but posting for the first time. I've been searching around already and found a solution to what I'm looking to do but for some reason I'm getting a weird result.
Basically my menu has so many items that I would like to see them in 2 columns. By searching I found that I needed to make the "ul" twice as wide as the "li" and float the "li" left. It is working but now I'm getting a blank space in the 2nd row.
#cssmenu {
padding: 0;
margin: 0;
border: 0;
width: auto;
}
#cssmenu ul,
#cssmenu li {
list-style: none;
margin: 0;
padding: 0;
}
#cssmenu ul {
z-index: 597;
}
#cssmenu ul li {
float: left;
min-height: 1px;
vertical-align: middle;
}
#cssmenu ul li.hover,
#cssmenu ul li:hover {
position: relative;
z-index: 599;
cursor: default;
}
#cssmenu ul ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 0;
z-index: 598;
width: 100%;
}
#cssmenu ul ul li {
float: left;
width: 250px;
}
#cssmenu ul ul ul {
top: 0;
left: 250px;
width: 500px;
height: 20px;
}
#cssmenu ul li:hover > ul {
visibility: visible;
}
#cssmenu ul ul {
bottom: 0;
left: 0;
}
#cssmenu ul ul {
margin-top: 0;
}
#cssmenu ul ul li {
font-weight: normal;
}
#cssmenu a {
display: block;
line-height: 1em;
text-decoration: none;
}
/* Custom CSS Styles */
#cssmenu {
background: #333333;
border-bottom: 4px solid #1b9bff;
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
font-size: 12px;
}
#cssmenu > ul {
*display: inline-block;
}
#cssmenu:after,
#cssmenu ul:after {
content: '';
display: block;
clear: both;
}
#cssmenu ul {
text-transform: uppercase;
}
#cssmenu ul ul {
border-top: 4px solid #1b9bff;
text-transform: none;
min-width: 190px;
}
#cssmenu ul ul a {
background: #1b9bff;
color: #ffffff;
border: 1px solid #0082e7;
border-top: 0 none;
line-height: 100%;
padding: 8px 20px;
font-size: 12px;
}
#cssmenu ul ul ul {
border-top: 0 none;
}
#cssmenu ul ul li {
position: relative;
}
#cssmenu ul ul li:first-child > a {
border-top: 1px solid #0082e7;
}
#cssmenu ul ul li:hover > a {
background: #4eb1ff;
color: #ffffff;
}
#cssmenu ul ul li:last-child > a {
-moz-border-radius: 0 0 3px 3px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
-moz-box-shadow: 0 1px 0 #1b9bff;
-webkit-box-shadow: 0 1px 0 #1b9bff;
box-shadow: 0 1px 0 #1b9bff;
}
#cssmenu ul ul li:last-child:hover > a {
-moz-border-radius: 0 0 0 3px;
-webkit-border-radius: 0 0 0 3px;
border-radius: 0 0 0 3px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
#cssmenu ul ul li.has-sub > a:after {
content: '+';
position: absolute;
top: 50%;
right: 15px;
margin-top: -8px;
}
#cssmenu ul li:hover > a,
#cssmenu ul li.active > a {
background: #1b9bff;
color: #ffffff;
}
#cssmenu ul li.has-sub > a:after {
content: '+';
margin-left: 5px;
}
#cssmenu ul li.last ul {
left: auto;
right: 0;
}
#cssmenu ul li.last ul ul {
left: auto;
right: 99.5%;
}
#cssmenu a {
background: #333333;
color: #CBCBCB;
padding: 0 20px;
}
#cssmenu > ul > li > a {
line-height: 48px;
font-size: 12px;
}
#cssmenu img {
vertical-align: middle;
}
Here's my jsFiddle: https://jsfiddle.net/b1hsakq2/1/
I'm missing something in the CSS....
Thanks for the help
The border-top on your first-child in list is causing the 3rd list item to not fit. See the revised fiddle here where I commented it out:
https://jsfiddle.net/b1hsakq2/3/
#cssmenu ul ul li:first-child > a {
/*border-top: 1px solid #0082e7;*/
}
The other option is to keep the above border-top on the first-child, but to even the height within the list, add a border-top to the other list items by adding this:
#cssmenu ul ul li > a {
border-top: 1px solid #0082e7;
}