css3 - How to target a parent class in CSS? -
this question has answer here:
- is there css parent selector? 25 answers
is there way target parent class in css?
<div class="accountarea"> <a class="auglink" href="/account"> account <i class="fa fa-angle-down icon-right"></i> </a> <div class="accountappear"> <div class="accountforce"> not logged in account. <form action="account.php" method="post"> <input type="text" name="email" placeholder="e-mail address" /> <input type="password" name="password" placeholder="password" /> <input type="submit" name="login" value="log in" class="minisubmit" /> </form> </div> <div class="accountbottom"> ddd </div> </div> </div> i need if input field in accountarea on focus (:focus), accountarea should stay visible (it's set go visible on hover - need both).
there isn't way select parent element css right now.
using javascript best option.
if jquery loaded on page see docs on tree traversal
Comments
Post a Comment