SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2001
    0 Post(s)
    0 Thread(s)

    Bgcolor on images

    I'm using a background-color: in a:hover for my links. The problem is, it also displays a background color on transparent images which are links. How can I prevent the images showing a bgcolor when they're links?

  2. #2
    SitePoint Enthusiast morgion's Avatar
    Join Date
    Jun 2002
    Fargo, ND
    0 Post(s)
    0 Thread(s)
    Wow, I didn't know that could happen. Sounds like something to be used for evil... like blink...

    It's a hack, but you could just include the image in a different hyperlink tag that still points to the same place, but doesn't have the style.

    If you've redefined all the links on your site to have that style, you could create something like
    a:hover.nobg { background-color: transparent }
    in a stylesheet section , then apply that class to the link tag around the image. Once again, you'll have to have separate links around the image and text.

    If you could post some of your code, that would also help.

    Good luck!
    Lord Morgion
    Paranoia is just reality on a finer scale. - Strange Days
    [ MacOS X | Mozilla | 1280 x 854 (15" PowerBook G4) | Millions ]
    [ | | ]


Posting Permissions

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