There is a menu made by listing ul > li > a
. It is necessary that when you hover over a menu item, there is an underscore. The problem is that the border-bottom
raises the menu item relatively inactive. min-height
juzat not really want. How to be in this situation?
.top_nav ul { margin: 0; padding: 0; } .top_nav ul li { display: inline-block; } .top_nav ul li a { float: left; padding: 10px 15px; margin: 0 3px; color: #999; text-transform: uppercase; } .top_nav ul li a.active, .top_nav ul li a:hover { border-bottom: 1px solid; color: #0088CC; border-bottom: 1px solid #0088CC; }
<div class="top_nav"> <ul> <li><a href="">ΠΠΎΠ±Π°Π²ΠΈΡΡ ΠΎΡΠ³Π°Π½ΠΈΠ·Π°ΡΠΈΡ</a> </li> <li><a class="active" href="">Π Π°Π·ΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅ ΡΠ΅ΠΊΠ»Π°ΠΌΡ</a> </li> </ul> </div>