0

I have a bunch of paragraphs that I want to line-indent. They all have a link inside of them with the same href attribute. I can style the text using the attribute for things like color, but I can't indent the text. I assume that's because I need to target the paragraph and not the link but I want to avoid additional markup. Can I target the paragraph using the href attribute in the link somehow with just css?

Barton Lewis
  • 157
  • 2
  • 5
  • 16

1 Answers1

0

I assume you have something like

<p>Some text with <a href="knownLink.html">a link</a></p>

and you want to style the whole paragraph. Unfortunately, CSS does not have "parent" selectors.

mdickin
  • 2,365
  • 21
  • 27