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

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -