can't make my link boxes go away

Discussion in 'HTML & Website Design' started by suze, Nov 28, 2007.

  1. #1
    Hi

    The box around my button images won't go away.

    I have used this combination of html and css before and it worked. I must be doing something wrong because my boxes won't go away. Can anyone spot what it is.

    <p>
    <a href="pages/faq.html">
    <img src="images/faq.gif" alt="FAQ Button" /></a>
    </p>



    a:link {
    text-decoration: none;
    }



    a:visited {
    text-decoration: none;
    }

    a:hover {
    text-decoration: none;
    }

    Thanks
     
    suze, Nov 28, 2007 IP
  2. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #2
    <a href="xyz"><img src="images/faq.gif" alt="FAQ Button" border="0"/></a>

    or

    img a {border:0;}
     
    YIAM, Nov 28, 2007 IP
  3. Saulie

    Saulie Peon

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The css that you are using doesn't apply to images and only to text. You will need to use "img a {border:0;}" as yiam said. Also in future instead of using a:link, a:visited etc just use a if you want them all the same.
     
    Saulie, Nov 28, 2007 IP
  4. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Other way around. :D
    a img, a:hover img {
      border: 0;
    }
    Code (markup):
     
    joebert, Nov 28, 2007 IP