I'm using Twitter Bootstrap and I'm having some weird using when hovering over a btn-primary
button.
This is my code :
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<ul class="nav nav-pills">
<li class="active">
<a href="#">Home</a>
</li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
<li><a href="#" class="btn btn-primary btn-small">
<i class="icon-user icon-white"></i> Log In
</a>
</li>
</ul>
</div>
</div>
</div>
And this is what happens :
before
on hover
Any ideas why this could be happening?
A special usage of mouseover event is a tooltip which shows a short description of the object under the pointer. The tooltip appears only after the mouse or stylus is held over the object for a certain amount of time.
Hovering is a fundamental digital action that involves placing the mouse cursor on the target link or button. Users mainly use the mouse hover action to access sub-menu items.
Alternatively referred to as mouseover or mouse hover, hover describes the act of moving a mouse pointer over a clickable object, but not actually clicking the left or right mouse button. For example, when you hover your mouse over any of the links on this page, they should change color, indicating they can be clicked.
2 solutions,
.navbar .nav > li > a.btn { display: inline-block; padding: 4px 10px 4px; margin: 5px 5px 6px; line-height: 18px; } .navbar .nav > li > a.btn-primary, .navbar .nav > li > a.btn-primary:hover { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); color: #ffffff; } .navbar .nav > li > a.btn-primary:active { color: rgba(255, 255, 255, 0.75); } .navbar .nav > li > a..btn-primary { background-color: #0074cc; background-image: -moz-linear-gradient(top, #0088cc, #0055cc); background-image: -ms-linear-gradient(top, #0088cc, #0055cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0055cc); background-image: -o-linear-gradient(top, #0088cc, #0055cc); background-image: linear-gradient(top, #0088cc, #0055cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0055cc', GradientType=0); border-color: #0055cc #0055cc #003580; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:dximagetransform.microsoft.gradient(enabled=false); } .navbar .nav > li > a.btn-primary:hover, .navbar .nav > li > a.btn-primary:active, .navbar .nav > li > a.btn-primary.disabled, .navbar .nav > li > a.btn-primary[disabled] { background-color: #0055cc; } .navbar .nav > li > a.btn-primary:active, .navbar .nav > li > a.btn-primary.active { background-color: #004099 \9; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With