Spaxix
Spaxix

Reputation: 31

How can I make this navigation bar using css?

I have designed this navigation bar in Photoshop and am lost as to how I could convert it to a pure css navigation bar, would anyone have any ideas ?

TIA.

Navigation Bar Image

Link to bigger image

Upvotes: 3

Views: 674

Answers (2)

Jonathan Miller
Jonathan Miller

Reputation: 1786

Its not fully complete, I ran out of time to work on the dropdown or add the search, but it should be a significant step in the right direction:

CSS:

nav { 
            display:block; margin:0; padding:0; width:978px; height:53px; 
            border-bottom:1px solid #abd2f9; border-top:1px solid #f0f9fe; border-left:1px solid #d1e7fc; border-right:1px solid #d1e7fc;
            -webkit-border-radius:20px; -moz-border-radius:20px; border-radius:20px;
            background:-webkit-gradient(linear, 0 0, 0 100%, from(rgba(238,248,255,1)), color-stop(100%, rgba(207,234,253,1)));
            background:-moz-linear-gradient(top,rgba(238,248,255,1), rgba(207,234,253,1) 100%);
            background:linear-gradient(top, rgba(238,248,255,1), rgba(207,234,253,1) 100%);
        }
        nav ul {
            display:block; margin:0; padding:0 45px; list-style:none;
        }
        nav ul li {
            float:left; display:block; margin:0; padding:0;
        }
        nav ul li a { 
            display:block; margin:0 16px 0 0; padding:0 16px; height:53px; line-height:53px; color:#444; text-decoration:none;
        }
        nav ul li a:hover {
            background:-webkit-gradient(linear, 0 0, 0 100%, from(rgba(207,234,253,1)), color-stop(100%, rgba(238,248,255,1)));
            background:-moz-linear-gradient(top,rgba(207,234,253,1), rgba(238,248,255,1) 100%);
            background:linear-gradient(top, rgba(207,234,253,1), rgba(238,248,255,1) 100%);
        }

        nav ul li ul {
            display:none; padding:0;
        }
        nav ul li ul li {
            float:none;
        }

HTML:

<nav>
    <ul>
        <li><a href="#">HOME</a></li>
        <li><a href="#">ABOUT</a></li>
        <li><a href="#">INFORMATION</a>
            <ul>
                <li><a href="#">NEWS</a></li>
                <li><a href="#">FAQ</a></li>
                <li><a href="#">EVENTS</a></li>
                <li><a href="#">HELP</a></li>
            </ul>
        </li>
        <li><a href="#">COURSES</a></li>
        <li><a href="#">CONTACT US</a></li>
    </ul>
</nav>

Upvotes: 1

phaxian
phaxian

Reputation: 1078

Check out web designer wall, it has one of the best examples of pure css drop-down menus I've ever seen (view source to see the css code). With some minor modification to the colors & styles you should be able to re-create your design.

Upvotes: 1

Related Questions