I'm trying to find a way to target the <ul>
and <li>
markups but only within a specific <div>
, not for the entire page. I have this in the HTML:
<div id="navbar_div">
<ul>
<li><a href="">Home</a></li>
<li><a href="">Products</a></li>
<li><a href="">Blog</a></li>
<li><a href="">About</a></li>
<li><a href="">Contact</a></li>
</ul>
</div>
In the CSS I would like to do something like:
div#navbar_div {
float:right;
}
div#navbar_div .ul {
list-style-type: none;
margin: 0;
padding: 0;
}
div#navbar_div .li {
display: inline;
}
ul
andli
in your CSS – Habile