Reputation: 865
I can't get the div to show on hover over the other div. I'm sure I'm missing something really basic.
.sidebarRightWork:hover .description {
display:block;}
.description { width:100%; height:100%; margin: 0 auto; position:absolute; background-color:#D4D4D4; z-index:15; display:none;}
EDIT
As you see, when you hover over 'information' nothing happens like it does in your fiddle (https://jsfiddle.net/lmgonzalves/f1c3vc0y/3/).
Upvotes: 1
Views: 1597
Reputation: 6588
You need +
(adjacent sibling) selector, because .description
is not a descendant of .sidebarRightWork
, but the next sibling. Just like:
.sidebarRightWork:hover + .description {
display:block;
}
EDIT:
Then you need also:
.sidebarRightWork:hover + .description, .description:hover {
display:block;
}
Note that I have positioned .description
to fill the entire screen. You can do it the way you want ;)
Upvotes: 3