Thursday 25 August 2016

css3 - CSS: Styling a Specific Paragraph that has a Specific Span







I'm trying to style a paragraph with a class of "long-sentence" which contains a span with a class of "background-fill". The target for styling must be the paragraph and not the span.



Therefore, this solution is inappropriate as it targets the span:




p.long-sentence span[class="background-fill"]


This selector appears perfect, however it targets a span with an attribute of "background-fill" and not a class:



p.long-sentence[span="background-fill"]


Can it be done? Or is this too stringent a criteria for a selector that has multiple variables?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...