html - Bootstrap 3 Active Menu State Colour -
This can be simple, although I can not seem to complete what I want.
Actually,
I have tried many CSS, but this is my present:
ul.nav A: Active {background- Color: # 3366CC! Important; }
The use of the navbar is followed:
& lt; Nav class = "navbar navbar-default navbar-static-top" role = "navigation" & gt; & Lt; Div class = "container-liquid" & gt; & Lt ;! - Brand and toggle are grouped for better mobile display - & gt; & Lt; Div class = "navbar-header" & gt; & Lt; Button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = "#bs-example-navbar-fall-1" & gt; & Lt; Span class = "sr-only" & gt; Toggle Navigation & lt; / Span & 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; / Button & gt; & Lt; / Div & gt; & Lt ;! - Collect nav links, forms and other content for toggling - & gt; & Lt; Div class = "fall navbar-fall" id = "bs-example-navbar-collapse-1" & gt; & Lt; Ul class = "nav nav-tablets nav-appropriate adjust-top" & gt; & Lt; Li class = "active" & gt; & Lt; A href = "" & gt; Home & lt; / A & gt; & Lt; / Li & gt;
etc.
Am I missing a simple CSS rule, colors change my other menu requirements quite independently, such as:
ul.nav {padding: 5px; } Ul.nav li a {color: #fff; } Ul.nav li a: Hover {color: # CC0033! Important; } Ul.nav a: hover {background-color: #fff! Important; }
Any help would be appreciated!
All you need is to add color to the tag in the li with the active class
ul.nav li.active one {background color: # 3366CC! Important; }
Comments
Post a Comment