#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Web Design, no border on image hyperlink


    I just started a website recently, and am having a few design issues. I wanted to make the header image a link back to the homepage, but now there is a border around it. I tried using 'style="border:none;" ' and so forth, but that hasn't helped.

    my website is runningcobra.com if anyone would like to take a look and give some advice, I'd really appreciate it!

    Thanks!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0
    Which browser are you using where you see the border around the header image? I'm using Firefox 15 (latest version as of 9/20/12) and I'm not seeing it.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0
    internet explorer
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0
    I'm using IE8 and I'm not seeing a border. Can you provide a screenshot?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    194
    Rep Power
    77
    in your main css file just put
    Code:
    img {
      border: 0;
    }
  10. #6
  11. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,127
    Rep Power
    1990
    Originally Posted by jack13580
    in your main css file just put
    That's close, but not quite right. For the border property, there's no valid value of 0. It has to be set as 'none' so it would be
    Code:
    img {
        border: none;
    }
    If you want to do it on images inside links only (where the main problems occur), it would be
    Code:
    a img {
        border: none;
    }
  12. #7
  13. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,128
    Rep Power
    4304
    Originally Posted by Catacaustic
    For the border property, there's no valid value of 0.
    Eh? "border: 0" is valid. And so is "border: none". Though I prefer to use "border: 0 none" myself, because an old version of Opera needed both (if I remember correctly).

    You're correct about the "a img" selector though.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo