943,963 Members | Top Members by Rank

Ad:
Apr 11th, 2007
0

CSS Nav Bar Help needed.

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster
kained is offline Offline
126 posts
since May 2004
Apr 11th, 2007
0

Re: CSS Nav Bar Help needed.

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?
Reputation Points: 18
Solved Threads: 4
Junior Poster
stupidenator is offline Offline
192 posts
since Mar 2005
Apr 12th, 2007
0

Re: CSS Nav Bar Help needed.

perfect cheers man
Reputation Points: 10
Solved Threads: 0
Junior Poster
kained is offline Offline
126 posts
since May 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: LayOut Trouble
Next Thread in HTML and CSS Forum Timeline: CSS - Making div vertically "overflow"





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC