Submit Your Article Forum Rules

Results 1 to 6 of 6

Thread: How to remove the blue border around a linked image?

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    123

    How to remove the blue border around a linked image?

    Hi all!

    I need to place a link on image to another site, but I don't want the blue border to be around the image. How do I prevent that from showing, as on most other sites?

  2. #2
    Junior Member
    Join Date
    Jan 2004
    Posts
    22
    Hah! This one is easy.
    Just add the border="0" paremater to your img tag.

    Your html tags may be something like this:

    [img]image.jpg[/img]

    If you omit the width and height it will default to whatever actual width and height the image has.

    By specifying the border parameter you won't have the blue border around it (or other color, whatever it is for links in your web page set up).

    It doesn't matter if your <a href=....> tag points to a web page on your site or elsewhere or the [img]...[/img] refers to an image on your site or elsewhere. The principle is the same.

  3. #3
    WebProWorld MVP mikmik's Avatar
    Join Date
    Aug 2003
    Posts
    1,557
    yes ChristinaS, that works.
    You can also make a class in your CSS document if you are using one. I do this for all my sites :
    .classname ( I use 'nobrdr' myself)

    So that you have:
    .nobrdr {border:0;}

    And put it in all places that you don't want a border like this :
    <img class="nobdr" src"path/to/image.jpg"></> (</> for xhtml)
    Babies don't need a vacation, but I still see them at the beach... it pisses me off! I'll go over to a little baby and say 'What are you doing here? You haven't worked a day in your life!'
    Steven Wright

  4. #4
    <img class="nobdr" src"path/to/image.jpg"></> (</> for xhtml)
    <img class="nobdr" src"path/to/image.jpg" /> (for xhtml)

  5. #5
    Senior Member redcircle's Avatar
    Join Date
    Aug 2003
    Posts
    424
    --OR--

    in your stylesheet just define

    img {
    border:0;
    }

    This will save you the time of adding the class to your existing images.
    www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
    www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.

  6. #6
    Senior Member
    Join Date
    Jan 2004
    Posts
    123
    Thanks to all of you for your comments - very helpful! (",)

Similar Threads

  1. Graphic Image Border
    By noel_x99 in forum Graphics & Design Discussion Forum
    Replies: 9
    Last Post: 10-18-2006, 01:55 AM
  2. How to get rid of Image border when hyperlinked
    By technica in forum Graphics & Design Discussion Forum
    Replies: 4
    Last Post: 01-18-2006, 01:37 AM
  3. Blue line around linked slices?
    By mmiceli44 in forum Graphics & Design Discussion Forum
    Replies: 5
    Last Post: 12-16-2005, 11:05 AM
  4. css opera image border
    By ozchris in forum Graphics & Design Discussion Forum
    Replies: 5
    Last Post: 11-05-2004, 03:59 AM
  5. Does the alt for a non-linked image is ignored by Google?
    By ethanliang in forum Google Discussion Forum
    Replies: 14
    Last Post: 06-28-2004, 01:01 AM

Posting Permissions

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