Jump to content

visited links change for all


dazz_club

Recommended Posts

Hi pople,I have set my styling for my links like this

.listF li a:link {text-decoration:none;color:#319ac2;font-weight:bold;font-size:9pt}.listF li a:visited {text-decoration: none;color:#133643;font-weight:bold;}.listF li a:active {text-decoration: underline;color:#369cc3;font-weight:bold;}.listF li a:hover {text-decoration: underline; color:#303030;font-weight:bold;}

when i click on a link all the links change to the visited styling. I'm sure the visited styling shuold appear for that link.here is my html code for the navigation

<ul class="listF">					<li><a href="#" title="encapsulated indicators">encapsulated Ind <span class="docSize">2mb</span></a></li>					<li><a href="#" title="chill checker">chill checker <span class="docSize">55kb</span></a></li>					<li><a href="#" title="8 level strips">8 level strips <span class="docSize">111kb</span></a></li>					<li><a href="#" title="3 level ministrips">3 level strips <span class="docSize">1.3mb</span></a></li>					<li><a href="#" title="5 level mini strips">5 level mini strips <span class="docSize">1.3mb</span></a></li>					<li><a href="#" title="clock indicators">clock indicators <span class="docSize">1.9mb</span></a></li>					<li><a href="#" title="4 level strips">4 level strips <span class="docSize">211kb</span></a></li>					<li><a href="#" title="colotemp">colotemp <span class="docSize">432kb</span></a></li>				</ul>

cheersDarren

Link to comment
Share on other sites

Try to remove the list and li stuff in the CSS and set it up like this.

a:link {text-decoration:none;color:#319ac2;font-weight:bold;font-size:9pt}a:visited {text-decoration: none;color:#133643;font-weight:bold;} a:active {text-decoration: underline;color:#369cc3;font-weight:bold;}a:hover {text-decoration: underline; color:#303030;font-weight:bold;}

Link to comment
Share on other sites

That will apply to all the links in your page, without id or class as it's universal.Should you need to separate out your links, you do need to use class but not really id.Have a look at the following example.

<html><head><style type="text/css">.class1 A:link {text-decoration: none}.class1 A:visited {text-decoration: none}.class1 A:active {text-decoration: none}.class1 A:hover {text-decoration: underline; color: red;}.class2 A:link {text-decoration: underline overline}.class2 A:visited {text-decoration: underline overline}.class2 A:active {text-decoration: underline overline}.class2 A:hover {text-decoration: underline; color: green;}</style></head><body>ONE TYPE OF LINKS<br><span class="class1"><a href="http://www.yahoo.com">YAHOO</a><br><a href="http://www.google.com">GOOGLE</a></span><br><br>ANOTHER TYPE OF LINKS<br><span class="class2"><a href="http://www.yahoo.com">YAHOO</a><br><a href="http://www.google.com">GOOGLE</a></span></body></html>

Link to comment
Share on other sites

No it's fine with a instead of A, the reason it's like that is because I knew of a good example and I simply copied it to save me typing all that from scratch, just laziness. :)
It's not fine. Current versions of html require lower case if you want it to validate. Older versions didn't require this, but do you really want to restrict your website to those older (and getting fewer) browser?
Link to comment
Share on other sites

It's not fine. Current versions of html require lower case if you want it to validate. Older versions didn't require this, but do you really want to restrict your website to those older (and getting fewer) browser?
Ah right, because I never typed it in that way anyway this wasn't really brought to my attention. Learn something new everyday.
Link to comment
Share on other sites

Umm... the HTML specification actually has tag names in uppercase. It is XHTML that requires lowercase names.CSS uses lowercase, but have a look at this style sheet by the W3C. Interesting? http://www.w3.org/TR/CSS21/sample.html

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...