1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Why some graphics have borders around and some not ??

Discussion in 'HTML & Website Design' started by tayiper, Aug 22, 2006.

  1. #1
    Sorry for a totally banal question: why some of the graphics have borders around them "by default" and some haven't; of course, all this applies only to cases when border: 0; (or in HTML: border="0") is not specified ...


    - For instance, see my home-site's events7.html page and you'll see small 16x16 icons (it's the "img.icon" class in the "sub.css" stylesheet-file) near by the links pointing to posts at Ars Technica forum; and these have no border "wrapped" around them.

    - While many of other graphics, namely the row of various graphics on the intro.html page (it's the "img.mix" class in the "root.css" stylesheet-file; note that now I've added the border: 0; line) all have borders around.


    /EDIT: One such example is the "The Internet Traffic Report" (I haven't fix yet this one, so you can clearly see the border) at the bottom of the same events7.html page linked above, while on the other hand graphics on certs.html page again don't have them.


    thanks in advance, tayiper
     
    tayiper, Aug 22, 2006 IP
  2. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #2
    /UPDATE: Oh well nevermind, I think that I already know the answer now ...


    I've just discovered "the secret" (at least I suppose so), i.e. I guess that it's the difference between posting a graphic "as a banner" (that links to some other page), and posting it "directly" onto a page, am I right ?!!


    P.S. -- Sorry for opening a thread before I thought everything through !!


    tayiper
     
    tayiper, Aug 22, 2006 IP
  3. IndigoBlack

    IndigoBlack Active Member

    Messages:
    132
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #3
    It looks like, to me, that they have borders around them because they are active links. Unless you specify for an image to not have a border, the browsers will add one to distinguish it as an active link.

    If you want to take the border off, go to the line that adds the image to your site and add:

    border="0"

    at the end. So it would look like this:

    <img src="images/someimage.jpg" height="x" width="x" border="0" />

    Hope this helps and good luck :)
     
    IndigoBlack, Aug 23, 2006 IP
  4. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #4
    Well I rather so it with CSS, but thanks anyway ...


    tayiper
     
    tayiper, Aug 23, 2006 IP
  5. IndigoBlack

    IndigoBlack Active Member

    Messages:
    132
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #5
    I'll have to recheck but I'm pretty sure the syntax is:

    img{
    border: 0px;
    }
     
    IndigoBlack, Aug 25, 2006 IP
    tayiper likes this.