Jump to content

[SOLVED] Underlined Links using pictures


Dracolas

Recommended Posts

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...

 

Link to comment
Share on other sites

I'm pretty sure the semi-colon at the end does not matter if that is the last property defined... does it? :o

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.