Support » Themes and Templates » A STYLE application question

  • danielt


    Hi everyone,

    I have a conundrum. I’m somewhat, but not nearly enough, versed in code to solve this problem.

    I have a theme that has a certain color contrast which makes a nice effect when you highlight a link, it makes the background of that text a solid color and changes the text color. However, the style is applied from the css page, to all links. It uses code a: which I infer means any anchor.

    I have a few links that are anchored to images. One of these images contains transparency. What happens is under the image a bit of the background color gets applied, and it looks goofy. Ordinarily if it was just a regular image, I’d just make the background of it solid based on where it’s located on the page. However, it’s an animated gif, and it would be more work to decode it and apply the background.

    So, my question is how can I setup that style so it will only apply it if the anchor is text and not image?

    Here’s what it has in the css file:

    a:hover { color: #000; background-color: #0f0; }

    I was researching this and came upon some mention that you can override a style by applying a new style right in the page where the specific item exists. I tried playing with this but I don’t quite know what the code should be.

    Any help is appreciated.

Viewing 1 replies (of 1 total)
  • Adam Brown


    Access the image’s style properties like this:

    a:hover img{background-color:transparent;}
Viewing 1 replies (of 1 total)
  • The topic ‘A STYLE application question’ is closed to new replies.