SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Uphoreum's Avatar
    Join Date
    Jul 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stopping Image Link Colored Edges

    When you make an image into a link, a colored box shows up around it. How can I get that to go away? I've seen lots of sites with images that didn't have that.

  2. #2
    SitePoint Member King Arthur's Avatar
    Join Date
    Jul 2006
    Location
    Los Angeles, CA, USA
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In CSS:
    Code:
    img
    {
      border: 0;
    }
    Or in HTML:
    Code:
    <img src="URL" border="0">
    I personally prefer the CSS method since it affects all images, but either works.

  3. #3
    SitePoint Enthusiast Uphoreum's Avatar
    Join Date
    Jul 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea, I meant for CSS, I guess I could've posted in the CSS forums, but I got my answer. Thanks!

  4. #4
    SitePoint Enthusiast Uphoreum's Avatar
    Join Date
    Jul 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wait, it works with html, but not with CSS. I used your exact code...

  5. #5
    SitePoint Member King Arthur's Avatar
    Join Date
    Jul 2006
    Location
    Los Angeles, CA, USA
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Err, it *should* work. I use it on like every webpage/site I code. o_O
    If said CSS is being used inside a webpage, either have it inside <style> tags inside the <head> tags, or have it inside style="" attributes inside the <img> tags (remove the brackets and "img" thing if you do this). If you use the inline style attributes however, that sort of defeats the purpose of CSS.

    If said CSS is in an external file, just place what I typed in there, and link to the CSS using <link> tags in your webpage's <head> tags.

    EDIT: Nah, I don't mind. I like helping. =) Also glad to hear you got it working.
    Last edited by King Arthur; Jul 25, 2006 at 14:55. Reason: Typing reply for post below since these posts are very close together in time

  6. #6
    SitePoint Enthusiast Uphoreum's Avatar
    Join Date
    Jul 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    woops, I put it in the wrong css file... sorry to make you type all that...


Bookmarks

Posting Permissions

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