I have a div like this:
<div class="someclass">
....
</div>
How can I say that the div should only be moved, if any of the parent divs hass class XYZ?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Select the element based on its parent/ancestor:
Without clear (or any) information as regards what ‘moving’ means, in context, I’m assuming that you’re using
positionto reposition the element in some manner. If you’re taking another approach, then simply amend the CSS rules to reflect your needs.