Advanced Search

Results 1 to 3 of 3

Thread: why some image in css contains blue line around it ?

  1. #1
    Join Date
    Apr 2007
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default why some image in css contains blue line around it ?

    I have an image in a css whenever i put html link to it i see there is an ugly blue line around it. Why is this happening and how can i remove it ? Many thanks.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    that is the default hyperlink property for image links. just as the blue color / underline is for text.

    you can get rid of it by using css either in your stylesheet or inline
    Code:
    <a href="/url/path"><img src="/image/path" style="border:none"></a>

  3. #3
    Join Date
    Nov 2007
    Location
    Olympic Penninsula WA USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Style Fix for that

    Type this in just before the closing </head> tag on your web page:

    <style type="text/css">
    img
    {border:0;}
    </style>

    That way you never have to use extra markup to remove the ugly blue
    border from linked images.

    HTML:
    <p><a href="http://myaffiliatesite.com" title="my affiliate site"><img src="image.jpg" title="my great image" alt="my great image" width="100" height="100" /></a></p>

    ClaireP

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
  •