R
R
Randewoo2019-01-30 21:28:48
css
Randewoo, 2019-01-30 21:28:48

How to change navbar color in UIkit?

I came across a simple and very cool framework (for me) - UIKit.
I need to make the navbar blue, I copied the code from here - https://getuikit.com/docs/navbar
Next, I chose the appropriate navbar - 5c51ed20c307c606935736.png
Here is the code:

spoiler
<nav class="uk-navbar-container" uk-navbar>

    <div class="uk-navbar-left">

        <ul class="uk-navbar-nav">
            <li class="uk-active"><a href="#">Active</a></li>
            <li>
                <a href="#">Parent</a>
                <div class="uk-navbar-dropdown">
                    <ul class="uk-nav uk-navbar-dropdown-nav">
                        <li class="uk-active"><a href="#">Active</a></li>
                        <li><a href="#">Item</a></li>
                        <li><a href="#">Item</a></li>
                    </ul>
                </div>
            </li>
            <li><a href="#">Item</a></li>
        </ul>

    </div>

    <div class="uk-navbar-right">

        <ul class="uk-navbar-nav">
            <li class="uk-active"><a href="#">Active</a></li>
            <li>
                <a href="#">Parent</a>
                <div class="uk-navbar-dropdown">
                    <ul class="uk-nav uk-navbar-dropdown-nav">
                        <li class="uk-active"><a href="#">Active</a></li>
                        <li><a href="#">Item</a></li>
                        <li><a href="#">Item</a></li>
                    </ul>
                </div>
            </li>
            <li><a href="#">Item</a></li>
        </ul>

    </div>

</nav>

But no matter how I try to change the color ( https://getuikit.com/docs/background), nothing comes out for me. Where to add this CSS class with color - .uk-background-primary(in the documentation, this color means blue)?
The color can be changed if specified style="background: #000;"in the <nav>, but I would very much like to do this using the framework and CSS styles.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question