我在此页面上有一个CSS菜单:http://itos3test.notexa.be/itos3test/customer-service-oplossingen/。当您将鼠标悬停在“ rol van het contact center ”或“ Bedrijfs doelstellingen ”上时,您会看到子菜单有2行。
当我现在悬停在第三个子菜单(“ Verkoop fondsenwerving ”或“ Klanten-Trouw verhogen ”)时,第四个子菜单跳到右边,之间的差距第一行和第二行变小,第四行显示第三行后的项目。
我尝试用firebug搜索造成这种情况的css,据我所知,容器的大小都是正确的。也许它继承了某些东西,或者我在CSS中犯了一个可怕的错误,但我看不到它。
CSS代码:
/* style main menu */
ul.shortcode_menu.solution-finder {
display: inline;
}
ul.shortcode_menu.solution-finder li {
list-style: none;
background: linear-gradient(#00A7FF 3.8%, #27027B) repeat scroll 0 0 #00A7FF;
border-radius: 2px;
float: left;
margin: 0 0 1em 1em;
padding: 0px;
text-align: center;
max-width: 150px;
width: 100%;
height: 80px;
}
ul.shortcode_menu.solution-finder li:hover {
background: linear-gradient(#54575A, #54575A) repeat scroll 0 0 rgba(0, 0, 0, 0);
border-left: 1px solid rgba(106, 115, 123, 0.5);
border-radius: 2px 2px 0 0;
border-right: 1px solid rgba(106, 115, 123, 0.5);
border-top: 1px solid rgba(106, 115, 123, 0.5);
margin-bottom: 0;
}
ul.shortcode_menu.solution-finder li a {
max-width: 150px;
width: 99%;
height: 65px;
margin: 0px;
float: left;
text-align: center;
padding-top: 15px;
color: #FFFFFF;
font-size: 18px;
text-decoration: none;
text-shadow: 0 1px 2px #000000;
}
ul.shortcode_menu.solution-finder li:hover a {
opacity: 0.9;
color: #FFFFFF !important;
}
/* style sub menus */
ul.shortcode_menu.solution-finder li ul.sub-menu {
width: 600px;
}
ul.shortcode_menu.solution-finder li ul.sub-menu li {
display: inline-block !important;
list-style: none;
max-width: 150px;
width: 100%;
height: 80px;
border: 1px solid #DDD;
margin-top: 0.2em;
margin-right: 0.2em;
margin-left: 0;
text-align: center;
padding: 0px 0px;
font-size: 18px;
color: #FFFFFF;
text-shadow: 2px 2px 5px #EEE;
}
ul.shortcode_menu.solution-finder li ul.sub-menu li:hover {
color: #FFFFFF;
text-shadow: none;
}
ul.shortcode_menu.solution-finder li ul.sub-menu li a {
max-width: 150px;
width: 99%;
height: 65px;
/* background: linear-gradient(#00A7FF 3.8%, #27027B) repeat scroll 0 0 #00A7FF;*/
display: block;
}
ul.shortcode_menu.solution-finder li ul.sub-menu li:hover a {
/* opacity: 0.9;
background: linear-gradient(#54575A, #54575A) repeat scroll 0 0 rgba(0, 0, 0, 0);
border-left: 1px solid rgba(106, 115, 123, 0.5);
border-radius: 2px 2px 0 0;
border-right: 1px solid rgba(106, 115, 123, 0.5);
border-top: 1px solid rgba(106, 115, 123, 0.5);
margin-bottom: 0;*/
}
有人有个主意吗?
答案 0 :(得分:0)
找到它:margin-bottom:0是问题