There are many words like this: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 ...
Each word is associated with multiple example sentences. And I want them to be hidden before the cursor is over the word. Here's my code.
DEMO: https://jsfiddle.net/kyubyong/umxf19vo/
HTML:
<a><b>test1</b></a>
<div class="divs">
<li>This is the first example</li>
<li>This is the second example</li>
<li>This is the third example</li>
</div>
<a><b>test2</b></a>
<div class="divs">
<li>This is the first example</li>
<li>This is the second example</li>
<li>This is the third example</li>
</div>
CSS
a:hover
{
background-color: lightgray;
}
.divs
{
display: none;
}
a:hover + .divs
{
display: block;
position: absolute;
background-color: lightgray;
width: 100%;
padding: 5px;
}
The problem is when the original line is more than one, the block of example sentences covers the words in the bottom line. I want them to go down so the example sentences don't cover them.