Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap drop down menu showing blue box after clicking
    text
    copied!<p>I'm using Bootstrap to build a drop-down menu for one of my tabs in the navbar. I'm trying to customize it; however, there is always this blue box that hovers the tab after I click the tab.</p> <p>It doesn't happen if I don't click the tab at all, but it happens after clicking it once and hovering my mouse over the same tab. The same thing happens in the submenu.</p> <p>I've tried different ways to override the CSS, but it's not working. Here's my code for the navbar. How do I override this?</p> <pre><code> &lt;nav class="navbar"&gt; &lt;div class="navbar-inner"&gt; &lt;a href="#" class="brand"&gt;&lt;div id="brand_font"&gt;Christina Yang&lt;/div&gt;&lt;/a&gt; &lt;a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/a&gt; &lt;div class="nav-collapse collapse"&gt; &lt;ul class="nav"&gt; &lt;li class="divider-vertical"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="inner-color"&gt;&lt;i class="icon-home"&gt;&lt;/i&gt;home&lt;/a&gt;&lt;/li&gt; &lt;li class="divider-vertical"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="inner-color"&gt;&lt;i class="icon-comment"&gt;&lt;/i&gt;blog&lt;/a&gt;&lt;/li&gt; &lt;li class="divider-vertical"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="inner-color"&gt;&lt;i class="icon-info-sign"&gt;&lt;/i&gt;about&lt;/a&gt;&lt;/li&gt; &lt;li class="divider-vertical"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="inner-color"&gt;&lt;i class="icon-camera"&gt;&lt;/i&gt;photography&lt;/a&gt;&lt;/li&gt; &lt;li class="divider-vertical"&gt;&lt;/li&gt; &lt;li class="dropdown"&gt; &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown" id="inner-color"&gt; &lt;i class="icon-user"&gt;&lt;/i&gt;connect &lt;b class="caret"&gt;&lt;/b&gt; &lt;/a&gt; &lt;ul class="dropdown-menu"&gt; &lt;li&gt;&lt;a href="#"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt; &lt;li class="divider"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li class="divider-vertical"&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/nav&gt; </code></pre> <p>Here's my relevant CSS work for this section. </p> <pre class="lang-css prettyprint-override"><code> @media (max-width: 767px) { .navbar .nav &gt; .active &gt; a:hover, .navbar .nav &gt; .active &gt; a:focus { background-color: #009999; display: none; border: none; /*box-shadow: 0 3px 8px rgba(0, 0, 0, 0.125) inset;*/ color: #555555; text-decoration: none; } } @media (max-width: 767px) { .nav-collapse .nav &gt; li &gt; a:hover, .nav-collapse .nav &gt; li &gt; a:focus, .nav-collapse .dropdown-menu a:hover, .nav-collapse .dropdown-menu a:focus { background-color: #009999; } } @media (max-width: 480px) { .nav-collapse .nav &gt; li &gt; a:hover, .nav-collapse .nav &gt; li &gt; a:focus, .nav-collapse .dropdown-menu a:hover, .nav-collapse .dropdown-menu a:focus{ background-color: #009999; } } .dropdown-menu a:hover,.dropdown-menu a:focus{ filter:none !important; -webkit-transition:background 1s ease; -moz-transition:background 1s ease; -o-transition:background 1s ease; transition:background 1s ease; } .dropdown-menu::after, .dropdown-menu::before{ border:none !important; } @media (max-width: 979px) { .navbar .nav &gt; li &gt; .dropdown-menu:after { border: none; } .navbar .nav &gt; li &gt; a, .navbar .dropdown-menu a { border-radius: 0; color: white; font-weight: normal; padding: 10px 10px 11px; } .dropdown-toggle &gt; a:visited { border: none; display: none; box-shadow: none; } .dropdown-toggle &gt; a:active { border: none; display: none; box-shadow: none; } .navbar .nav &gt; li &gt; a:hover { display: none; } .navbar .nav &gt; li &gt; a { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload