CSS/HTML | Container/ Grouping CSS styles and using in one div & :hover -



CSS/HTML | Container/ Grouping CSS styles and using in one div & :hover -

i have next css:

.bckgrnd_150 { background: rgba(0, 0, 0, 0.5); width: 150px; height: 100px; transition-duration: 2s; } .bckgrnd_150:hover { background: rgba(255, 255, 255, 0.98); } .bckgrnd_150 .wp { color: white; } .bckgrnd_150 .wp:hover { color: black; }

since i'm begginer in class, need help. utilize whole code (upper) , apply 1 or simplier: when hover on .bckgrnd_150 class (styled box background) apply within div.

there's html:

<div class="bckgrnd_150"> <img alt="" src="http://files.tado-hamann.webnode.com/200001010-bd155be2cb/appbar.download.png" style="border-width: 0px; border-style: solid; margin: 0px; width: 25px; height: 25px;"> <p class="wp">blahblah</p> </div>

so can see (http://jsfiddle.net/5d4yyp9p/) hovering on box works, don't impact .bckgrnd_150 .wp class (text). help; when hover on box, impact text :hover (because need hover on text impact him).

i'm sorry, i'm new. :)

you use:

.bckgrnd_150:hover .wp { color: black; }

instead of

.bckgrnd_150 .wp:hover { color: black; }

as hovering parent, apply on kid elements also.

jsfiddle here.

html css hover

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -