views:

597

answers:

6

I have the following style for my footers in my css file:

#footer { 
    text-align: center;
    font-size: .7em;
    color:#000000;
}

This is the html for the footer part:

<div id="footer">
   <br> //google ad
   <br>
   <br>
   <A HREF="http://www.site1.com"&gt;Blog&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A     
   HREF="http://site1/rss.xml"&gt;RSS&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A 
   HREF="http://www.mexautos.com"&gt;Autos Usados</A>&nbsp;&nbsp;&nbsp;<A 
   HREF="http://www.site2"&gt;Videos Chistosos</A>&nbsp;&nbsp;&nbsp;<A 
   HREF="http:/s.blogspot.com">Fotos de Chavas</A><br>
   Derechos Reservados &copy; 2008-<?=date('Y')?> address<br>
</div>

But for some reason some of the links show underlined.

Any ideas how I can make it so the links do not appear underlined?

Thx

+11  A: 

you can try

#footer a { text-decoration: none }

that means all <a> tags within the element with id footer will have no underline.

動靜能量
Argh damnit, you were faster^^
Kevin D.
haha, you are fast -- even adding a comment
動靜能量
I might be being unnecessarily "nitpicky" - but not necessarily all a tags...something with a higher specificity could override what you put above. I have ran into problems with this before and could never figure out why it didn't work. Just an FYI.
GreenieMeanie
to have the highest specificity, we need <a style="text-decoration: none">click me</a> but usually that's not recommended unless we really need to.
動靜能量
+8  A: 

try:

#footer a{ 
   text-decoration: none;
}
Kevin D.
+7  A: 

Apply the following style:

a, a:link, a:visited, a:hover
{
    text-decoration: none;
}

I've intentionally given you complete coverage of all the states that an <a> tag can have, but you very well may be able to get away with the following as well:

a
{
    text-decoration: none;
}

Finally, if you only want this applied to the footer:

#footer a, #footer a:link, #footer a:visited, #footer a:hover
{
    text-decoration: none;
}
Soviut
+2  A: 

Add the following line to your stylesheet:

a {text-decoration:none;}
Robert Harvey
+3  A: 

Not a direct answer to your question, but I'd highly recommend installing Firebug in Firefox as it allows you to see what classes are applied and it what order - essentially helping you to debug your CSS.

Frans
A: 

try this

 #footer a { 
  text-decoration : none !important;
 }
Arun P Johny