Dracolas Posted October 23, 2009 Share Posted October 23, 2009 I read that to get rid of Underlines on links you put a {text-decoration:none} but when I do this in my style.css the lines are still there.... why is this? Thank you for your help ahead of time! Dracolas Quote Link to comment Share on other sites More sharing options...
Dorky Posted October 23, 2009 Share Posted October 23, 2009 a {text-decoration:none;} Quote Link to comment Share on other sites More sharing options...
merylvingien Posted October 23, 2009 Share Posted October 23, 2009 Basic link without underline a:link {text-decoration:none;} If you want a link that has been visited to not be underlined: a:visited {text-decoration:none;} If you want a link that is hovered over to BE underlined so its obvious that it is a link a:hover {border-bottom:1px dotted;} You forgot to add the ; at the end of your code... Quote Link to comment Share on other sites More sharing options...
seanlim Posted October 25, 2009 Share Posted October 25, 2009 I'm pretty sure the semi-colon at the end does not matter if that is the last property defined... does it? Anyway, like what merylvingien said, you should use the pseudo-classes when defining styles for anchor elements. Remember also that the order in which the pseudo-classes are defined is important. a:hover must be declared after a:link and a:visited. a:active can also be used, but it must be declared after the above 3 pseudo-classes. Quote Link to comment Share on other sites More sharing options...
Dracolas Posted October 26, 2009 Author Share Posted October 26, 2009 Ok i put a:link {text-decoration:none;} a:visited {text-decoration:none;} in my style.css and it's still not working.... any other ideas guys? Quote Link to comment Share on other sites More sharing options...
seanlim Posted October 27, 2009 Share Posted October 27, 2009 Check that there aren't any other definitions that overwrites your definition. For example, if you have a container div with id="container", then: #container a:link{ ... } will overwrite a:link{ ... } regardless of where these definitions are declared relative to each other. Remember to check any external stylesheets too. Quote Link to comment Share on other sites More sharing options...
sticks464 Posted October 27, 2009 Share Posted October 27, 2009 You can also add img {border:0;} Quote Link to comment Share on other sites More sharing options...
Dracolas Posted October 27, 2009 Author Share Posted October 27, 2009 Ok the problem was that the links were in my .nav div and i was putting the a:... in the main portion of the style.css. I added the a:... to the .nav section and it fixed it! Thank you guys! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.