css3 - CSS-Selector for multiple elements -
i not @ getting how use more advanced css-selectors + or > needing prevent js, maybe can me out particular situation of block:
<section class="rf_re1-suche_container"> <input type="search" placeholder="your search"> <button>send</button> </section>
and wanna that:
.rf_re1-suche_container input:focus{ background:orange; }
but button. so: if input has focus want input , button have same background. how that? thanks!
you need target input , button separately. because want apply when input has focus, need repeat entire selector including input:focus
portion, use +
combinator link button focused input:
.rf_re1-suche_container input:focus, .rf_re1-suche_container input:focus + button { background: orange; }
<section class="rf_re1-suche_container"> <input type="search" placeholder="your search"> <button>send</button> </section>
Comments
Post a Comment