dazz_club Posted September 22, 2008 Share Posted September 22, 2008 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 More sharing options...
Kingy Posted September 22, 2008 Share Posted September 22, 2008 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 More sharing options...
dazz_club Posted September 22, 2008 Author Share Posted September 22, 2008 thanks for your help.This would apply to all links in my page that don't have an id or class? Link to comment Share on other sites More sharing options...
Kingy Posted September 22, 2008 Share Posted September 22, 2008 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 More sharing options...
dazz_club Posted September 22, 2008 Author Share Posted September 22, 2008 cheers for your response.Just noticed in your code where by you created a class, the capital A....is that a must when creating custom classes for links. The universal example styling uses lower cases, a.CheersDazz Link to comment Share on other sites More sharing options...
Kingy Posted September 22, 2008 Share Posted September 22, 2008 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. Link to comment Share on other sites More sharing options...
dazz_club Posted September 22, 2008 Author Share Posted September 22, 2008 Thank you very much for all your help! Link to comment Share on other sites More sharing options...
Kingy Posted September 22, 2008 Share Posted September 22, 2008 Don't mention it. Link to comment Share on other sites More sharing options...
Jerry62704 Posted September 22, 2008 Share Posted September 22, 2008 thanks for your help.This would apply to all links in my page that don't have an id or class?You want the "hover" before the "active" to make sure it works correctly.It would be with your css. Link to comment Share on other sites More sharing options...
Jerry62704 Posted September 22, 2008 Share Posted September 22, 2008 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 More sharing options...
Kingy Posted September 22, 2008 Share Posted September 22, 2008 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 More sharing options...
Synook Posted September 24, 2008 Share Posted September 24, 2008 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 More sharing options...
rzea Posted September 26, 2008 Share Posted September 26, 2008 Mmm... That looks somewhat similar (in concept) as the Reset CSS technique. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.