Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question CSS decoration for images

    Setting up a link with the use of an image.

    Noticed the image has the link border automatically applied to it. Can I get rid of it?

    I know how to remove decorations from text; but can't find a way to remove it from an image.

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    a img {
    border: 0;
    }
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    Still seeing the ugly link border around the image.
    Placed the following code directly into the page.

    Code:
    <span id="link">
    <a href=viewdb4REVISED_2.php?Records=".$Records." style='border: 0;'>
    <img src='CourseInRevision.gif' align='absmiddle'>
    </a>
    </span>
    Also placed the following into the CSS template.
    Code:
    span#link {
    	border: none;
    }

  • #4
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    You could switch out that "style='border: 0;'" with this:

    Code:
    class="noborder"
    and then add this in your CSS:

    Code:
    a.noborder {
    color: #fff;
    background: transparent;
    }
    That is, if your page background is white.
    Last edited by Jutlander; 07-27-2007 at 05:55 PM.
    .
    .

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    And if that still doesn't work, learn to read properly. The first solution suggested was
    Code:
    a img {
    border:0;
    }
    You didn't follow directions.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Regular Coder
    Join Date
    Jan 2006
    Posts
    251
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Well, we learn everyday. Thanks guys.

    I thought the # symbol was mandatory for CSS.
    Code:
    span#link {
    	border: none;
    }
    Evidently not, what I thought was a typo is correct and works!
    Code:
    a img {
    border:0;
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •