Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRajinder Sihota
3,473 PointsChanging the nav bar look
Currently my nav bar (home, menu, contact, about) looks like this: www.sunnysihota.com
I'm trying to make it look like this: http://sunnyssihota.wix.com/lao1
I tried using box model techniques but that just changed the whole box surrounding all 4 of the nav items not the individual items. How can I work on each of the items itself.
Here's my index.php code for that area:
<div id="header" class="grid_12">
<h1>Lao Vientiane</h1>
<h2><i>Catering</i></h2>
<div id="nav">
<ul>
<li><a href="sunnysihota.com/Lao">Home</a></li>
<li><a href="sunnysihota.com/Lao/Menu">Menu</a></li>
<li><a href="sunnysihota.com/Lao/Contact">Contact</a> </li>
<li><a href="sunnysihota.com/Lao/About">About</a></li>
</ul>
</div>
</div>
2 Answers
J A
6,092 PointsHere is some basic css to get you started. You will need to add things like box shadows, drop down functionality, different styling based on the current page, ect.
li {
display: inline-block;
padding: 5px;
border: 1px solid black;
background-color: #F0EFE9;
width: 15%;
-webkit-transition: background-color .75s;
-moz-transition: background-color .75s;
-o-transition: background-color .75s;
transition: background-color .75s;
}
li a {
font-size: 60%;
text-decoration: none;
color: inherit;
}
li:hover {
color: white;
background-color: #A67829;
}
James Barnett
39,199 PointsHere are 2 tutorials to get you started