0

This is my html Code:

<div id="login_sub_wrapper" class="no_shadow input_wrapper">

  <input type="submit" id="login_sub" class="sub_btn">

</div>

I want that when anybody clicks on button with id login_sub, #login_sub_wrapper should be scalled (transform : scale(.8, .8) )

I am trying to do the following thing:

#login_sub:active #login_sub_wrapper
{

    tranform: scale(.8,.8);

}

But it's not working.

duplode
  • 31,361
  • 7
  • 69
  • 130
  • You have your elements flip flopped in `#login_sub:active #login_sub_wrapper`. `login_sub` is a descendant of `login_sub_wrapper` but your selector has them flipped. – j08691 Jun 03 '19 at 18:39
  • There is no such thing as a parent selector in CSS. Selectors work only downward and forward which means that starting from a certain element you can only select siblings and descendants. – connexo Jun 03 '19 at 18:40
  • There is no way of saying "if my descendant is `:active`, do this" in CSS. – Heretic Monkey Jun 03 '19 at 18:41

0 Answers0