SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with wrapping <a> around <img>

    Im a decent html coder, but ive never had this problem before. i have images and whenever i try to wrap <a> tags around them (so that they link to a new page when clicked on), the image has this blue outline. it is the same color as the blue underline in text hyperlinks and when i click the image and go back, the blue border turns purple, again like text links. i tried using css to get rid of text-decoration in <a> tags, but the border is still there. this presents a problem because it messes up my whole layout with its new shape. the code looks like this:

    <a href="#"><img src="images/index_1.jpg"></a>

    when i take out the <a> tags, it looks perfectly fine. any help is appreciated.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    a img {border:none}
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2002
    Location
    Scotland, UK
    Posts
    530
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or <img src="xxx" border="0">

    R.


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
  •