Unordered Lists

Reply

Join Date: Jun 2006
Posts: 1,169
Reputation: Duki has a spectacular aura about Duki has a spectacular aura about Duki has a spectacular aura about 
Solved Threads: 9
Duki's Avatar
Duki Duki is offline Offline
Veteran Poster

Unordered Lists

 
0
  #1
Aug 26th, 2009
Is there a way to make links in unordered lists be non-underlined by default? And when the user hovers over the link, it becomes underlined?

Here's the current code:
HTML and CSS Syntax (Toggle Plain Text)
  1. <ul>
  2. <li><a href="water">Water</a></li>
  3. <li><a href="wastewater">Wastewater</a></li>
  4. <li><a href="surveying">Surveying</a></li>
  5. <li><a href="aerial">Aerial</a></li>
  6. <li><a href="it">Technology Consulting</a></li>
  7. </ul>

On the page with the lists, all of the links are underlined by default and the underline goes away when you hover over it. We want the opposite of this.
It is practically impossible to teach good programming style to students that have had prior exposure to Basic; as potential programmers they are mentally mutilated beyond hope of regeneration.

-Edsger Dijkstra
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 15
Reputation: chavansoft is an unknown quantity at this point 
Solved Threads: 0
chavansoft chavansoft is offline Offline
Newbie Poster

Re: Unordered Lists

 
0
  #2
Aug 26th, 2009
Duki,
I have listed two cases for the hovers. use what you really need off

case 1:
HTML and CSS Syntax (Toggle Plain Text)
  1. <style>
  2. #hover li a {
  3. text-decoration:underline;
  4. }
  5. #hover li a:hover {
  6. text-decoration:none;
  7. }
  8. </style>
  9. <ul id="hover">
  10. <li><a href="water">Water</a></li>
  11. <li><a href="wastewater">Wastewater</a></li>
  12. <li><a href="surveying">Surveying</a></li>
  13. <li><a href="aerial">Aerial</a></li>
  14. <li><a href="it">Technology Consulting</a></li>
  15. </ul>

case 2:

HTML and CSS Syntax (Toggle Plain Text)
  1.  
  2. <style>
  3. #hover li a {
  4. text-decoration:none;
  5. }
  6. #hover li a:hover {
  7.  
  8. text-decoration:underline;
  9. }
  10. </style>
  11. <ul id="hover">
  12. <li><a href="water">Water</a></li>
  13. <li><a href="wastewater">Wastewater</a></li>
  14. <li><a href="surveying">Surveying</a></li>
  15. <li><a href="aerial">Aerial</a></li>
  16. <li><a href="it">Technology Consulting</a></li>
  17. </ul>

Regards
chavansoft
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 9
Reputation: AdrianaTX is an unknown quantity at this point 
Solved Threads: 0
AdrianaTX's Avatar
AdrianaTX AdrianaTX is offline Offline
Newbie Poster

Re: Unordered Lists

 
0
  #3
Sep 2nd, 2009
You can also do a reset and have all ul not be underlined and only create a class for a list you want to underline.


HTML and CSS Syntax (Toggle Plain Text)
  1.  
  2. <style>
  3.  
  4. ul li {
  5. text-decoration : none;
  6. }
  7.  
  8. </style>
Last edited by AdrianaTX; Sep 2nd, 2009 at 3:30 pm.
In Texas ya'll
Reply With Quote Quick reply to this message  
Reply

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