How can I make a element display on the hover of its parent using CSS? -



How can I make a <p> element display on the hover of its parent <div> using CSS? -

.divtwochild { font-size: 24pt; margin-left: 500px; margin-top: 40px; width: 400px; display: inline-block;} .divtwochild:hover, .divtwochild { display: block;} .divtwotext { font-size: 30pt; font-family: open sans; font-weight: bolder; text-align: right; display: none;}

the html <p> element in <div> element. want display <p> element when parent <div> hovered.

you can select based off hover status of parent, such

.parent { /* whatever */ } .child { /* whatever */ display:none; } .parent:hover .child { /* whatever */ display: initial; }

http://jsfiddle.net/g6ur51xj/

css

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

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