html - Media queries in bootstrap , not letting me change size and color of nav -


i playing around bootstrap , using media queries edit of nav bar settings when page gets smaller. trying make colour of background around navigation turns pink , text white reason not happening.

i trying make when gets smaller bootstrap has icon bar can press down , drop down menu, way big when gets mobile version , reason cant make appear smaller. actual text of navigation not small icon

css:

@media screen , (max-width: 768px) {   .navbar-default .navbar-nav > li > a:hover,    .navbar-default .navbar-nav > li > a:focus {         background-color: #ff00ff;         font-size: 15px;         padding: 5px; } } 

again sorry if easy solution starting learn etc using bootstrap , of it's new me. on great.

it's because other styles overriding css. should use inspectors chrome's devtools see happens.

how using !important temporarily forcing style?

    background-color: #ff00ff !important;     font-size: 15px !important; 

of course it's not best practice, see: https://css-tricks.com/when-using-important-is-the-right-choice/


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -