Grow your CSS skills. Land your dream job.

Image has a link border on it, I want it to none.

  • # April 24, 2008 at 5:27 pm

    I have an image and whenever I add a link to it, it then has a blue border around it. I don’t want it to have any border so…

    I have put the image in a div with an ID of "blue" and added this code to my style sheet:

    Code:
    div#blue a {color:none; text-decoration:none}
    div#blue a:hover {color:none; text-decoration:none}

    Still I get a border, what am I doing incorrectly?

    Thanks

    # April 24, 2008 at 5:48 pm

    There might be a css rule for it but in your html page, when you put the anchor and image tag, do this….

    Code:
    # April 24, 2008 at 5:58 pm

    thanks Nike, I appreciate it. I fixed it with

    Code:
    a img { border:0; }

    Dang, that was easy!

    # April 24, 2008 at 6:11 pm

    Hi,

    You can also add :-

    a {
    outline-style: none;
    }

    This will hide the dotted border in firefox on the link when clicked.

    Tob :D

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".