html - Hovering on element and making another element appear at the same time -


i've been trying figure out long time , can't seem it. have following html:

<div class="b">     <button>show when hover</button> </div> <div class="a">when hover on background should change</div> 

with corresponding css:

.b {     float: right;     display: none; } .a {     float: left;     display: inline;     width: 1000px; }  .a:hover {     background: gray; }  .a:hover + .b {     display: block; } 

what i'm trying whenever hover on a b div , corresponding button should show. in addition, want such when mouse on button, background of a still gray if hovering on it. can't seem figure out. ideas?

relevant jsfiddle: http://jsfiddle.net/sn19k1wz/3/

you can changing position of a , b

<div class="a">when hover on background should change</div> <div class="b">     <button>show when hover</button> </div> 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -