I have some html:
<p>
<button type="submit" name="btn" value="Save">Save</button>
<button type="submit" name="btn" value="Cancel">Cancel</button>
</p>
I would like to create a CSS selector that matches all "p" tags that contain the above button(s) so that I can add a :
padding-top:20px;
to it.
It would also be interesting to see if one can add this style to another parent like "div".
I guess one would just do something like:
p button, div button {}
The above applies the style to the button tag whereas I wish to add it to the "div" or "p" tag.
Thoughts??
Many thanks in advance.
`, select by class, and move on
– Matt Ball Dec 03 '13 at 00:24