drop down menu trouble - php

this is my menu code in html which works fine, all classes and database references works fine only sliding down does not work
<script src="<?php echo JS ?>main.js"></script>
<nav id="top_nav" class=" clearfix">
<ul class="container clearfix">
<?php
foreach ($meni as $kat): ?>
<li role="">
<a href="<?php echo base_url()?> ">
<?php echo $kat['title']; ?>
</a>
<ul class="top_nav_lv2 clearfix">
<?php foreach ($pod_meni as $pat) : ?>
<?php if($pat['meni_id'] == $kat['id_meni']): ?>
<li>
<?php echo $pat['title'] ?>
</li>
<!-- KRAJ IF USLOVA -->
<?php endif; ?>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</nav>
<!-- END OF NAV -->
sliding down does not work and there is no error report
heres my js code
var meni = $('#top_nav');
meni.on('mouseenter', 'li', function(){
document.find('ul').style.display = 'block';
($(this).find('ul').stop().slideDown('fast'));
})
.on('mouseleave', 'li', function(){
($(this).find('ul').stop().slideUp('fast'));
});
and here is css
#top_nav{float: right;width: 61%}
nav ul {margin-top: 0}
nav ul li {float: left;display: inline-block;padding: 39px 20px 40px 20px;border-right: 1px solid transparent;position: relative;}
nav ul li:hover{background: url(../../img/resursi/meni_hover.png);border-right: 1px solid white;-moz-box-shadow: inset 6px 0 7px -7px #000;-webkit-box-shadow: inset 6px 0 7px -7px #000;box-shadow: inset 6px 0 7px -7px #000;}
.current {background: url(../../img/resursi/meni_hover.png);border-right: 1px solid white;-moz-box-shadow: inset 6px 0 7px -7px #000;-webkit-box-shadow: inset 6px 0 7px -7px #000;box-shadow: inset 6px 0 7px -7px #000;}
nav ul li a {color:#666666 ;text-decoration: none;font-family: georgia;}
nav ul li a:hover { color:#d10000 ;}
nav ul.top_nav_lv2 {clear: both; margin: 0; padding: 0px 0 0 0 ; display: none; background: red;position: absolute;left: 0; top:0px; z-index: 100;}
nav ul.top_nav_lv2 li {display: block; margin:0 0px 0 0px; padding: 0px 0 0px 10px;font-size: 14px;width: 140px; z-index: 1000;border-bottom: 2px solid transparent;}
nav ul.top_nav_lv2 li:hover {border-bottom: 2px solid transparent;background: rgba(255,255,255,0.07);}
nav ul.top_nav_lv2 li a {float: left; width: 120px; border-bottom: 2px solid transparent;padding: 8px 0 8px 10px;}
nav ul.top_nav_lv2 li a:hover {border-bottom: 2px solid rgba(255,255,255,0.6);}

This line is useless :
document.find('ul').style.display = 'block';
in :
meni.on('mouseenter', 'li', function(){
document.find('ul').style.display = 'block';
($(this).find('ul').stop().slideDown('fast'));
})
Try to comment It, this should work.
And for esthetic matter:
nav ul.top_nav_lv2{
top:80px;
}

Related

Hover over li not displying div [duplicate]

This question already has answers here:
Is there a CSS parent selector?
(33 answers)
Closed 4 years ago.
I have ol in my header of the page. In last two there is an Username and profile pic. And I want to show dropdown menu on hover over username or profile pic. But it is not displaying menu on hover. There is one lebel inside my dropdown-content.In mozilla it is not showing anything on hover and in chrome it is also not showing on hover but by default it is showing label.
.head{
top:0;
background:#424242;
padding:1px;
height:10%;
}
li{
display:inline-block;
color:#E0E0E0;
cursor:pointer;
padding:10px 10px 2px 10px;
font-size:20px;
}
li:hover{
color:white;
}
li.active{
color:white;
border-bottom:1px solid white;
}
.right{
float:right;
color:white;
}
#profilepic{
border-radius:50%;
width:40px;
height:40px;
margin:-10px 50px 0 20px;
}
.dropdown-content {
display:none;
position: absolute;
background-color: #f1f1f1;
min-width: 150px;
right:0;
margin-right:20px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content label {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content label:hover {background-color: #ddd;}
.right:hover .dropdown-content {display: block;}
<div class="head">
<ul>
<li>HOME</li>
<li onClick="NewApplication();">NEW APPLICATION</li>
<li onClick="PendingApplication();">PENDING APPLICATION</li>
<li onClick="Customer();">APPROVED</li>
<li>LOAN STRUCTURE</li>
<li class="right"><img id="profilepic" src="images/emp2.jpg"></li>
<li class="right">ABC</li>
</ul>
<div class="dropdown-content">
<label onClick="Setting();">SETTINGS</label>
</div>
</div>
Please restructure your html like so, this will be ideal for showing the dropdown.
The below class will be used to show the hidden dropdown.
.show-settings:hover .dropdown-content {
display: block;
}
.right {
float: right;
color: black;
position:relative;
}
#profilepic {
border-radius: 50%;
width: 40px;
height: 40px;
margin: -10px 50px 0 20px;
}
.show-settings:hover .dropdown-content {
display: block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 150px;
right: 0;
margin-right: 20px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
overflow: hidden;
}
.dropdown-content label {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content label:hover {
background-color: #ddd;
}
<div class="head">
<ul>
<li>HOME</li>
<li onClick="NewApplication();">NEW APPLICATION</li>
<li onClick="PendingApplication();">PENDING APPLICATION</li>
<li onClick="Customer();">APPROVED</li>
<li>LOAN STRUCTURE</li>
<li class="right show-settings">
<img id="profilepic" src="http://via.placeholder.com/50x50"> username
<div class="dropdown-content">
<label onClick="Setting();">SETTINGS</label>
</div>
</li>
</ul>
</div>
Putting space between two CSS selctors (.class1 .class2), specify that you want a hirarchy - when .class2 is nested inside class1. You can't by CSS only to get the parent of an element. So, to solve your problem, you should do it by js, or including .dropdown-content inside the <ul> element (change it from <div> to <li>, because inside lists only <li> elements are valid), and then access it by CSS3's general sibling selector (or by CSS3's adjacent sibling selector, I don't use it here):
Solution 1:
.right {
float: right;
}
#profilepic {
border-radius: 50%;
width: 40px;
height: 40px;
margin: -10px 50px 0 20px;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 150px;
right: 0;
margin-right: 20px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content label {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content label:hover {
background-color: #ddd;
}
.right:hover ~ .dropdown-content, /* or ".right:hover + .dropdown-content" with adjacent sibling selector */
.dropdown-content:hover /* For the dropdown won't disappear when hover it */ {
display: block;
}
<div class="head">
<ul>
<li>HOME</li>
<li onClick="NewApplication();">NEW APPLICATION</li>
<li onClick="PendingApplication();">PENDING APPLICATION</li>
<li onClick="Customer();">APPROVED</li>
<li>LOAN STRUCTURE</li>
<li class="right"><img id="profilepic" src="images/emp2.jpg"></li>
<li class="right">ABC</li>
<li class="dropdown-content">
<label onClick="Setting();">SETTINGS</label>
</li>
</ul>
</div>
Solution 2:
window.onload = function() {
var dropdown = document.querySelector('.dropdown-content');
document.querySelectorAll('.right').forEach(function(el) {
el.addEventListener('mouseover', function() {
dropdown.style.display = 'block';
}, false);
el.addEventListener('mouseout', function() {
dropdown.style.display = 'none';
}, false);
});
};
.right {
float: right;
}
#profilepic {
border-radius: 50%;
width: 40px;
height: 40px;
margin: -10px 50px 0 20px;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 150px;
right: 0;
margin-right: 20px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content label {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content label:hover {
background-color: #ddd;
}
<div class="head">
<ul>
<li>HOME</li>
<li onClick="NewApplication();">NEW APPLICATION</li>
<li onClick="PendingApplication();">PENDING APPLICATION</li>
<li onClick="Customer();">APPROVED</li>
<li>LOAN STRUCTURE</li>
<li class="right"><img id="profilepic" src="images/emp2.jpg"></li>
<li class="right">ABC</li>
</ul>
<div class="dropdown-content">
<label onClick="Setting();">SETTINGS</label>
</div>
</div>

bootstrap li links not working on the server

menu REPORT is not working (links) while TOOLS and other dropdown menus are working (moving to other pages). why is the REPORT menu is working locally but not on the ubuntu server?
both of them uses the same structure but looks different because in styling
ADDITIONAL:
when you click the li tag, example: BY TYPE . it will go to rep_handle.php. then from rep_handle.php it will move to another location with stat_type VARIABLE to date_handler.php. but it just stop to stat_type.php.
does it has conflict with my CSS? please advise.. thanks
REPORT
<a class = "dropdown-toggle" data-toggle = "dropdown" href = "#"> Reports </a>
<ul class = "dropdown-menu">
<li class="library">
<a class = "dropdown-toggle" href = "#"> Library </a>
</li>
<li class="libraryli divider" style=""></li>
<li class="libraryli dropdown-submenu" style="">
<a class = "dropdown-toggle" href = "#">  • Yearly </a>
<ul class = "dropdown-menu">
<li> By Type</li>
<li> By <?php echo $CS; ?></li>
</ul>
</li>
<li class="libraryli dropdown-submenu" style="">
<a class = "dropdown-toggle" href = "#">  • TRW </a>
<ul class = "dropdown-menu">
<li>Top Visitors</li>
<li> By Section</li>
<li>Comparison By Type</li>
<li> Comparison By <?php echo $CS; ?></li>
</ul>
</li>
<li class="libraryli divider" style="display:none;"></li>
<li> Service Days</li>
<li> Records</li>
</ul>
JS
<script>
$(document).ready(function(){
$('.dropdown-submenu a.dropdown-toggle').on("click", function(e){
$(this).next('ul').toggle();
e.stopPropagation();
e.preventDefault();
$('.dropdown-submenu a.dropdown-toggle').not(this).next('ul').hide();
});
});
</script>
<script>
$(document).ready(function(){
$('.library').on("mouseover", function(e){
$(this).siblings('.libraryli').show();
e.stopPropagation();
e.preventDefault();
$('span.caret-pr').addClass("caret-reversed");
});
$('.library').on("click", function(e){
$(this).siblings('.libraryli').toggle();
e.stopPropagation();
e.preventDefault();
$('span.caret-pr').toggleClass("caret-reversed");
});
});
</script>
CSS
.dropdown-submenu
{
position: relative;
}
.dropdown-submenu>.dropdown-menu
{
top: 0;
left: 100%;
margin-top: -6px;
margin-left: 1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu
{
display: block;
}
.dropdown-submenu>a:after
{
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 4.5px 0 4.5px 4.5px;
border-left-color: #000;
margin-top: 4.5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after
{
border-left-color: #000;
}
.dropdown-submenu.pull-left
{
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu
{
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
.caret-pr
{
display: block;
content: " ";
float: right;
width: 0;
height: 0;
margin-top: 6px;
margin-right: -10px;
border-top: 5px solid ;
}
.caret.caret-reversed
{
border-top-width: 0;
border-bottom: 5px solid ;
}
.libraryli
{
background-color:#f5f5f5;
}
</style>

Drop down bottom disappier when move mouse cursor on it

I've got a problem : when i try to move the cursor of the mouse on the sub-menu of the drop down, for some motive it disappier.
I try to check in file css end in its file js but at the third day again i didn't find the solutions..i think that could be some problem with [block] in class css. does someone see if there something that wrong end eventually how could operate to resolve this problem? under here post an image with the code.
Thank in advance.
Here another image...maybe understanding better:
here the code about the top-link :
/* ======================================================================================= */
--> .top-link { background: #f7f7f7;line-height: 35px; position: relative;color: #6a6a6a; border-bottom: 1px solid #d8d8d8;}
.form-language, .form-currency { float: left;}
.form-language label { display: none;}
.form-language select, .form-currency select { padding: 4px 10px; background: #f2f2f2;}
p.welcome-msg { margin: 0 0 0 25px; float:left; padding: 5px 0;}
.top-link ul.links { padding: 5px 0;}
.top-link ul.links li { padding:0 15px 0 0; float: left;}
.top-link ul.links li a { color: #6a6a6a;font-size: 11px;text-transform: uppercase; }
.top-link ul.links li a:hover { }
.call-phone{text-align: right;}
.call-phone span{color:#999;font-weight: bold;}
here the code about bottom Drop down :
.drop-lang {
list-style: none;
padding: 0;
margin: 0;float: right;
}
.drop-lang .drop-trigger {
position: relative;
z-index: 9999;
float: right;
padding: 0 5px 0 10px;
}
.drop-lang li a {
position: relative;
padding: 5px 0 5px 0;
display: block;
color: #6a6a6a;
text-transform:uppercase;
font-weight: normal;
font-size: 11px;
z-index: 9999;
}
.drop-lang .drop-trigger .sub-lang {
position: absolute;
top:40px;
left:-1px; /* dropdown left or right */
list-style: none;
padding:0 11px 0 4px;
margin: 0;
display: none;
background: #f7f7f7;
border: 1px solid #d8d8d8;
border-top: none
z-index: 9999;
}
.drop-lang .drop-trigger:hover .sub-lang {
top:45px;
display: block;
}
.drop-lang .sub-lang li a { padding: 0 5px; line-height: 22px; display: block; color: #666; text-transform:uppercase; font-weight: normal; font-size: 11px; border-top: 1px solid #d8d8d8; border-right:0;border-left:0; border-bottom:0; border-radius:0;}
.drop-lang .sub-lang li a:hover { }
Html/php part :
<?php if(count($this->getStores())>1): ?>
<div class="form-language">
<label for="select-language"><?php echo $this->__('Language:') ?></label>
<ul class="drop-lang">
<li class="drop-trigger">
<?php foreach ($this->getStores() as $_lang): ?>
<?php if($_lang->getId() == $this->getCurrentStoreId()): ?>
<a class="<?php echo $_lang->getCode() ?>" href="<?php echo $_lang->getCurrentUrl() ?>"><?php echo $this->htmlEscape($_lang->getName()) ?><i class="fa fa-angle-down"></i></a>
<?php endif?>
<?php endforeach; ?>
<ul class="sub-lang">
<?php foreach ($this->getStores() as $_lang): ?>
<?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' class="selected"' : '' ?>
<li><a class="<?php echo $_lang->getCode() ?>" href="<?php echo $_lang->getCurrentUrl() ?>"<?php //echo $_selected; ?>><?php echo $this->htmlEscape($_lang->getName()) ?></a></li>
<?php endforeach; ?>
</ul>
</li>
</ul>
</div>
<?php endif; ?>
Try the fiddle at - https://jsfiddle.net/456f2sf7/
.drop-lang .drop-trigger:hover .sub-lang {
top:20px;//Updated value
display: block;
}
Just decreasing the top margin to 20px, ensures that the dropdown does not disappear as it is visible only on hover.

How to change this code to show blocks in-line?

I have php code:
<?php
function metro_page_card($page) {
$html = "\t<li>\n\t\t<a href=\"".get_page_link($page->ID)."\">\n";
$icon = get_post_meta($page->ID, "Icon", true);
$html .= "\t\t\t".wp_get_attachment_image($icon, array('96', '96'))."\n";
$html .= "\t\t\t<p>".$page->post_title."</p>\n";
$html .= "\t\t\tSome text\n";
$html .= "\t\t</a>\n\t</li>\n";
return $html;
}
//[child_pages]
function metro_child_pages() {
$id = get_the_ID();
$pages = get_pages(array('child_of' => $id));
$html = "<ul class=\"page_card_grid\">\n";
foreach($pages as $page) {
$html .= metro_page_card($page);
}
$html .= "</ul>\n";
return $html;
}
add_shortcode('child_pages', 'metro_child_pages');
?>
Rendered html source:
ul.page_card_grid li {
display: inline-block;
width: 200px;
height: 200px;
margin: 20px;
}
ul.page_card_grid li a {
display: inline-block;
color: #555;
width: 200px;
height: 200px;
padding: 20px 16px 16px 16px;
font-size: 16px;
text-decoration: none;
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}
ul.page_card_grid li a p {
margin: 8px 0 8px 0;
font-size: 20px;
text-align: center;
}
ul.page_card_grid li a img {
margin: 0 52px 0 52px;
}
ul.page_card_grid li a:hover {
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
}
<ul class="page_card_grid">
<li>
<a href="http://local/index.php/sample-page/child-page-1/">
<img width="96" height="96" src="http://local/wp-content/uploads/2016/05/ic-1-150x150.png" class="attachment-96x96 size-96x96" alt="ic_timetable" srcset="http://local/wp-content/uploads/2016/05/ic-1-150x150.png 150w, http://local/wp-content/uploads/2016/05/ic-1.png 256w" sizes="(max-width: 96px) 100vw, 96px" />
<p>Child page 1</p>
Some text
</a>
</li>
<li>
<a href="http://local/index.php/sample-page/child-page-2/">
<p>Child page 2</p>
Some text
</a>
</li>
</ul>
I want show these card in single line. If it hasn't enough screen space then a part of cards must move to new line and etc. But I have a very strange result at this moment.
How can I fix this bug?
P.S. I don't know maybe it's important but I need to all card area works like link (To the user can click in any place of card).
Try with vertical-align property to this element : ul.page_card_grid li
It fixed the issue :
ul.page_card_grid li {
display: inline-block;
vertical-align: top;
width: 200px;
height: 200px;
margin: 20px;
}
ul.page_card_grid li a {
display: inline-block;
color: #555;
width: 200px;
height: 200px;
padding: 20px 16px 16px 16px;
font-size: 16px;
text-decoration: none;
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}
ul.page_card_grid li a p {
margin: 8px 0 8px 0;
font-size: 20px;
text-align: center;
}
ul.page_card_grid li a img {
margin: 0 52px 0 52px;
}
ul.page_card_grid li a:hover {
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
}
<ul class="page_card_grid">
<li>
<a href="http://contedevel.local/index.php/sample-page/child-page-1/">
<img width="96" height="96" src="http://contedevel.local/wp-content/uploads/2016/05/ic_timetable-1-150x150.png" class="attachment-96x96 size-96x96" alt="ic_timetable" srcset="http://contedevel.local/wp-content/uploads/2016/05/ic_timetable-1-150x150.png 150w, http://contedevel.local/wp-content/uploads/2016/05/ic_timetable-1.png 256w" sizes="(max-width: 96px) 100vw, 96px" />
<p>Child page 1</p>
Some text
</a>
</li>
<li>
<a href="http://contedevel.local/index.php/sample-page/child-page-2/">
<p>Child page 2</p>
Some text
</a>
</li>
</ul>

Menu items don't have same height

I am using wordpress on my site, marblesandmore.com, and have a theme that I currently am adjusting.
The website is using a menu function build in to wordpress and the items use cufon and css.
The problem is the following:
- the last 2 items have an offset...?
- This is only visible in chrome and IE.
The php used:
<div id="menu">
<?php $menuClass = 'nav superfish clearfix';
$menuID = 'secondary-menu';
$secondaryNav = '';
if (function_exists('wp_nav_menu')) {
$secondaryNav = wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'menu_id' => $menuID, 'echo' => false, 'walker' => new description_walker() ) );
};
if ($secondaryNav == '') { ?>
<ul id="<?php echo $menuID; ?>" class="<?php echo $menuClass; ?>">
<?php if (get_option('estore_swap_navbar') == 'false') { ?>
<?php show_categories_menu($menuClass,false); ?>
<?php } else { ?>
<?php if (get_option('estore_home_link') == 'on') { ?>
<li <?php if (is_home()) echo('class="current_page_item"') ?>><?php esc_html_e('Home','eStore') ?></li>
<?php }; ?>
<?php show_page_menu($menuClass,false,false); ?>
<?php } ?>
</ul> <!-- end ul#nav -->
<?php }
else echo($secondaryNav); ?>
</div> <!-- #menu -->
Css:
ul#secondary-menu { padding: 24px 0px 0px 23px; margin-top:24px; }
ul#secondary-menu li { padding-right: 20px; }
ul#secondary-menu li.current_page_item > a > strong, ul#secondary-menu li.current-menu-item > a > strong { color:#ede7c2; }
ul#secondary-menu li a strong { color:#000000; text-transform: lowercase; font-size:16px; font-weight:normal; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); margin-bottom:-3px; }
ul#secondary-menu li a span { color: #828282; font-family: arsmaquettepro,Helvetica, sans-serif; /*text-shadow: 1px 1px 1px #2d2d2d;*/ }
ul#secondary-menu li a:hover { text-decoration: none; }
ul#secondary-menu li a:hover strong { color: #ede7c2; }
ul#secondary-menu li a:hover span, ul#secondary-menu li > a > span { color: #7b786a; }
There should be no difference between the first 4 items and the next 2.
Any idea what causes the offset?
Marblesandmore.com
EDIT: The answer below appears to be right, so the solution has to be in the css of the submenu:
ul#secondary-menu ul { width: 178px; background: url(images/secondary-dropdown.png) repeat-y; padding: 3px 0px 15px; box-shadow: 3px 6px 7px 1px rgba(0, 0, 0, 0.5); -moz-box-shadow:3px 6px 7px 1px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 3px 6px 7px 1px rgba(0, 0, 0, 0.5); border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-top-left-radius: 0px; -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; border-top-right-radius: 0px; -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; border: 1px solid #ffffff; border-top: none; }
ul#secondary-menu li:hover ul, ul#secondary-menu li.sfHover ul { left:0px; top:43px; }
ul#secondary-menu li:hover ul ul, ul#secondary-menu li.sfHover ul ul { left:173px; top:-3px; border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; border: 1px solid #232323; }
ul#secondary-menu ul li { background: url(images/secondary-dropdown-bottom.png) repeat-x bottom left; padding: 0px 0px 2px 2px; }
ul#secondary-menu ul li a { display: block; padding: 9px 3px 9px 28px; width: 145px; /*font-weight: bold; */font-size:14px; color: #000000; font-family: arsmaquettepro, Helvetica, Arial, sans-serif; /*text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); background: url(images/secondary-dropdown-bullet.png) no-repeat 15px 17px;*/ }
ul#secondary-menu ul li a:hover { background-color: #383838; color: #ede7c2; }
I think your problem may be is caused by:
margin-bottom:-3px;
in
ul#secondary-menu li a strong
selector.
I can't see your page, so im not sure about that answer.
The last 2 object only have a 16px height while the other menu objects got 18px.
edit: Sorry i just realized how bad this answer is without telling you where the problem is.. Will try to check it.
i think it has something to do with the fact that the last 2 menu items has no submenus, somehow those ul tags for the submenus seem to add 2px to the height.
Ok, this is not a "nice" solution, rather ugly to be honest, but i think it works. You can just target the 2 last items in the menu by using their id's and adding a margin at the top.
#menu-item-3606, #menu-item-3604 {
margin-top: 2px;
}
just remember that if u ever change those menu items in any way, they will have new identifiers so you would need to change the id's in the css. As I said, not a good solution but it works.
There would also be problem if you for some reason added submenus to these two menu items.
#Bart van Sleeuwen Please Remove this class from style.css
ul#secondary-menu li#menu-item-3604 strong { color:#666666; }
ul#secondary-menu li#menu-item-3606 strong { color:#666666; }
and Find the li class in html
<li id="menu-item-3604" class="menu-item menu-item-type-post_type menu-item-object-page">
change it to like this
<li id="menu-item-3604" class="menu-item menu-item-type-custom menu-item-object-custom">

Categories