CSS Nav Bar Help needed.

Thread Solved

Join Date: May 2004
Posts: 102
Reputation: kained is an unknown quantity at this point 
Solved Threads: 0
kained kained is offline Offline
Junior Poster

CSS Nav Bar Help needed.

 
0
  #1
Apr 11th, 2007
Right. I'm designing a site and I at the moment have a very basic nav bar on it. What i want to do is take out the underlines for the links and put an icon next to the text(like a bullet point) for some reason it isn't working, anyone feel like helping me out. I will change all the fonts and formats later so it doesn't matter for now.

css code
HTML and CSS Syntax (Toggle Plain Text)
  1. html,body{margin:0;padding:0}
  2. body{font: 76% arial,sans-serif}
  3. p{margin:0 10px 10px}
  4. a{display:block;color: #006;padding:10px}
  5. div#header{position:relative}
  6. div#header h1{height:80px;line-height:80px;margin:0;
  7. padding-left:10px;background: #EEE;color: #79B30B}
  8. div#header a{position:absolute;right:0;top:23px}
  9. div#content p{line-height:1.4}
  10. /*div#extra{background:#FF8539}*/
  11. /*div#footer{background: #333;color: #FFF}*/
  12. div#footer p{margin:0;padding:5px 10px}
  13. div#footer a{display:inline;padding:0;color: #C6D5FD}
  14.  
  15. div#wrapper{float:left;width:100%}
  16. div#content{margin-left:200px}
  17. div#content{padding-top:20px}
  18. div#navigation{float:left;width:200px;margin-left:-100%}
  19. div#extra{clear:left;width:100%}
  20.  
  21. /* The following is the css for a nav bar */
  22. #navlist
  23. {
  24. margin-left: 0;
  25. padding-left: 0;
  26. padding-top:100px;
  27. list-style: none;
  28. }
  29.  
  30. #navlist li
  31. {
  32. padding-left: 10px;
  33. background-image:url(../Documents and Settings/Dave/My Documents/appleorganics/appleicon.gif) ;
  34. background-repeat: no-repeat;
  35. background-position: 0 .5em;
  36. }

and here is my html for the nav div tag.
HTML and CSS Syntax (Toggle Plain Text)
  1. <div id="navigation">
  2. <ul id="navlist">
  3. <li id="active"><a href="#" id="current">Home</a></li>
  4. <li><a href="#">Your Account</a></li>
  5. <li><a href="#">Shop</a></li>
  6. <li><a href="#">Issues</a></li>
  7. <li><a href="#">Partners</a></li>
  8. <li><a href="#">FAQ</a></li>
  9. <li><a href="#">Contact</a></li>
  10. </ul>
  11. </div>

what have i done wrong?


dave
Last edited by kained; Apr 11th, 2007 at 10:16 am.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 192
Reputation: stupidenator is an unknown quantity at this point 
Solved Threads: 4
stupidenator's Avatar
stupidenator stupidenator is offline Offline
Junior Poster

Re: CSS Nav Bar Help needed.

 
0
  #2
Apr 11th, 2007
HTML and CSS Syntax (Toggle Plain Text)
  1. #navlist
  2. {
  3. margin-left: 0;
  4. padding-left: 0;
  5. padding-top:100px;
  6. list-style: none;
  7. }
  8.  
  9. #navlist li
  10. {
  11. padding-left: 10px;
  12. background: url(../Documents and Settings/Dave/My Documents/appleorganics/appleicon.gif) no-repeat left #356AA0;
  13. }
  14.  
  15. #navlist li a, #navlist li a:link, #navlist li a:visited {
  16. text-decoration: none;
  17. color: #FFF;
  18. }
  19.  
  20. #navlist li a:hover {
  21. text-decoration: underline;
  22. color: #88AC0B;
  23. }

Here is what I changed in your css for the navlist and it seemed to work on my computer. Is this what you are looking for?
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 102
Reputation: kained is an unknown quantity at this point 
Solved Threads: 0
kained kained is offline Offline
Junior Poster

Re: CSS Nav Bar Help needed.

 
0
  #3
Apr 12th, 2007
perfect cheers man
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC