KJ Stahl
KJ Stahl

Reputation: 47

How to add a hover on bootstrap nav?

I am trying to get this navbar to indent in a triangle when the mouse is hovering over the different tabs. I haven't been able to find anything, though I do think it would involve jquery. Here's the code.

        <div class="navbar navbar-inverse navbar-fixed-top ">
        <div class="container">

            <a href="#about" class="navbar-brand"><img class="img" src="img/Logo.png" alt="Wood Innovations" height="50" width="100"/></a>

            <button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">

                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>

            </button>

            <div class="collapse navbar-collapse navHeaderCollapse">

                <ul class="nav navbar-nav navbar-right navbar-inverse">
                    <li><a href="#about">About</a></li>
                    <li><a href="#products">Products</a></li>
                    <li><a href="#orderform">Order Form</a></li>
                    <li><a href="#contact">Contact Us</a></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="body">

        <section id="about">
            <h1>About</h1>
        </section>

        <section id="products">
            <h1>Products</h1>
        </section>

        <section id="orderform">
            <h1>Order Form</h1>
        </section>

        <section id="contact">
            <h1>Contact Us</h1>
        </section>

    </div>


.body {
text-align: center;
}

#about {
padding-top: 7%;
}

.navbar {
height: 70px;
}

.img {
float: left;
}

li {
padding-top: 7px;
}

Upvotes: 0

Views: 277

Answers (1)

KJ Stahl
KJ Stahl

Reputation: 47

This is the solution

.tab:hover span{
    display:block;   
}

Upvotes: 1

Related Questions