Julian
Julian

Reputation: 175

CSS images next to links - more specific?

I am using something like this:

.entry a {
  padding: 2px 0 0 8px;
  background: transparent url(images/link_arrow_light.gif) left top no-repeat;
  text-decoration: underline;
}

Which works fine but adds that image to all links (images, h3 tags, ...)

Is there a css way to have it only appear besides links that are within p-tags?

Upvotes: 0

Views: 640

Answers (1)

kennytm
kennytm

Reputation: 523724

.entry p a {

This forces the <a>s to be a descendent of a <p> (while the <p>s must also be descent of some tags with the class entry.)

Upvotes: 3

Related Questions