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

 

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.

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.

Archived

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

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