linking image in CSS

Discussion in 'CSS' started by masuma, Jul 13, 2009.

  1. #1
    Hi I am facing problem with linking an image from CSS. I did from html but it shows a bad border around.So I want to link the image from css. is it possible. plz help with your suggestion.
     
    masuma, Jul 13, 2009 IP
  2. aquilax

    aquilax Member

    Messages:
    126
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #2
    use
    img{
    border:none;
    }
    and link it from HTML.
     
    aquilax, Jul 13, 2009 IP
  3. KellyAX

    KellyAX Peon

    Messages:
    113
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <html>
    <head>
    <style>IMG {BORDER:NONE}</style>
    </head>
    <body><br />
    <img src="http://www.google.com/intl/en_ALL/images/logo.gif">
    </body>
    </html>
    HTML:
     
    KellyAX, Jul 13, 2009 IP
  4. masuma

    masuma Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes when i link the image from html it shows a border and i set border:none from css. but it doesn't work.I have noticed that the border it shows is not a border. it shows default color of <a> tag around the image. And i need to deactivate this color .by background is not solid. If it was i could set the color of <a>=color of bg.
    plz any suggestion?
     
    masuma, Jul 13, 2009 IP
  5. KellyAX

    KellyAX Peon

    Messages:
    113
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    
    <html>
    <head>
    <style>
    A: IMG {BORDER:NONE !important;}
    </style>
    </head>
    <body><br />
    <a href="http://google.com"> <img src="http://www.google.com/intl/en_ALL/images/logo.gif"> </a>
    </body>
    </html>
    Code (markup):
    ^^ Should work.
     
    KellyAX, Jul 13, 2009 IP
  6. jason18241

    jason18241 Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    sounds like the link element has the border. Try a {border:0}
     
    jason18241, Jul 15, 2009 IP