LearningCoder
09-14-2011, 05:59 PM
Hello, have a menu but would like to select the last 2 list items and give these certain css padding values.
How could I achieve this? Here is my code:
HTML:
<div id="nav">
<ul><li><a href="#" title="Home">Home</a></li>
<li><a href="#" title="News">News</a></li>
<li><a href="#" title="Members">Members</a></li>
<li><a href="#" title="Forums">Forums</a></li>
<li></li>
<li></li>
<li><a href="#" title="Server">Server</a></li>
<li><a href="#" title="Help">Help</a></li>
</ul>
</div>
CSS:
@font-face {font-family: ITC Avant Garde Gothic Pro;
src: url('fonts/ITCAvantGardePro-Md.otf');}
@font-face {font-family: ITC Avant Garde Gothic Pro;
font-weight: bold;
src: url('fonts/ITCAvantGardePro-Md.otf');}
#nav {width: 800px;
height: 25px;
background-color: white;
position: relative;
top: -10%;
border-top: 2px solid #a6a6a7;
padding-bottom: 5px;
padding-top: 5px;
border-bottom: 2px solid #a6a6a7;}
#nav ul {list-style: none;
font-size: 18pt;
color: #006daf;
font-family: "ITC Avant Garde Gothic Pro";
text-transform: lowercase;
margin: 0;
padding: 0 0 0 0px;}
#nav li {display: inline;
padding: 0 26px;
line-height: 25px;
font-size: 18pt;}
#nav a,
#nav a:link,
#nav a:visited {color: #a6a6a7;
text-decoration: none;}
#nav a:active,
#nav a:hover {color: #f7852c;
text-decoration: none;}
#nav a.active {color: #9bccea;
font-weight: bold;
text-decoration: none;}
Thank you for any help,
Regards,
LC.
How could I achieve this? Here is my code:
HTML:
<div id="nav">
<ul><li><a href="#" title="Home">Home</a></li>
<li><a href="#" title="News">News</a></li>
<li><a href="#" title="Members">Members</a></li>
<li><a href="#" title="Forums">Forums</a></li>
<li></li>
<li></li>
<li><a href="#" title="Server">Server</a></li>
<li><a href="#" title="Help">Help</a></li>
</ul>
</div>
CSS:
@font-face {font-family: ITC Avant Garde Gothic Pro;
src: url('fonts/ITCAvantGardePro-Md.otf');}
@font-face {font-family: ITC Avant Garde Gothic Pro;
font-weight: bold;
src: url('fonts/ITCAvantGardePro-Md.otf');}
#nav {width: 800px;
height: 25px;
background-color: white;
position: relative;
top: -10%;
border-top: 2px solid #a6a6a7;
padding-bottom: 5px;
padding-top: 5px;
border-bottom: 2px solid #a6a6a7;}
#nav ul {list-style: none;
font-size: 18pt;
color: #006daf;
font-family: "ITC Avant Garde Gothic Pro";
text-transform: lowercase;
margin: 0;
padding: 0 0 0 0px;}
#nav li {display: inline;
padding: 0 26px;
line-height: 25px;
font-size: 18pt;}
#nav a,
#nav a:link,
#nav a:visited {color: #a6a6a7;
text-decoration: none;}
#nav a:active,
#nav a:hover {color: #f7852c;
text-decoration: none;}
#nav a.active {color: #9bccea;
font-weight: bold;
text-decoration: none;}
Thank you for any help,
Regards,
LC.