I am trying to style all div's content, using the universal selector (*)
The issue is - if the content is not <span>
, <p>
, <hX>
etc - it is not being selected. any suggestions how to solve this )if possible at all)?
CSS:
#content * {
background-color: green;
padding:10px;
color:#FFF;
}
HTML
<div id="content">
<h3>Hello</h3>
<p>test paragraph</p>
and this fails to be selected
</div>
I have reasons not to wrap that line.
Here's JSFiddle: https://jsfiddle.net/yroLx1kj/
Here is the expected result:
Thanks!