Note that there are some explanatory texts on larger screens.

plurals
  1. POhover effect for li list
    primarykey
    data
    text
    <p>I have an <code>&lt;ol&gt;</code>list to which I have added color. This is working fine. But when I add a div, which has 2 tags the hover effect is not applying.</p> <p>In my code, the hover is not happening for second <code>&lt;li&gt;</code>.</p> <p><strong>HTML:</strong></p> <pre><code>&lt;div class="test"&gt; &lt;ol&gt; &lt;a href="#"&gt;&lt;li&gt;&lt;div&gt;&lt;span&gt;test 1&lt;/span&gt;&lt;p&gt;Mvdshe&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;li&gt;&lt;div&gt;&lt;span&gt;test 12&lt;/span&gt;&lt;p&gt;sdgmksgb&lt;/p&gt;&lt;/div&gt; &lt;div class="icons"&gt;&lt;a href="#" class="play"&gt;&lt;/a&gt;&lt;span class="dividr"&gt;&lt;/span&gt;&lt;a href="#" class="suffle"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;li&gt;&lt;div&gt;&lt;span&gt;test 11&lt;/span&gt;&lt;p&gt;Name dgdg&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;&lt;/a&gt; &lt;/ol&gt; &lt;/div&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>.test{ position:relative; height:auto; width:100%} .test ol{margin:0; padding:0; font:normal 30px 'SegoeWPLight', Verdana, Geneva, sans-serif; color:#afafaf; text-align:left; list-style:none; counter-reset: listCounter;} .test ol li{vertical-align:middle; padding:10px 20px; border-bottom:#d4d4d4 solid 1px; border-top:#fff solid 1px; counter-increment: listCounter;} .testol li:before { content: counter(listCounter) " "; width:30px; margin-right:15px; display: inline-block; text-align: right; } .test ol li span{vertical-align:middle; display:block; color:#008fcd; font:normal 18px 'SegoeWPLight', Verdana, Geneva, sans-serif;} .test ol li p{vertical-align:middle; display:block; margin:0; padding:0; font:normal 14px 'SegoeWPLight', Verdana, Geneva, sans-serif; color:#797979;} .test ol li img{vertical-align:middle; padding-left:10px } .test ol li div{ display:inline-block; margin-left:25px; vertical-align:middle; } .test ol a{ text-decoration:none; font:normal 30px 'SegoeWPLight', Verdana, Geneva, sans-serif; color:#afafaf;} .test ol a:hover li{ background-color:#f4f4f4} .test ol a.mus_active li{ background-color:#f4f4f4} .icons{display:inline-block; float:right; vertical-align:middle; width:auto; margin-top:20px} .play{background:url(http://www.timeshighereducation.co.uk/magazine/graphics/search_icon_big.gif) no-repeat left; width:25px; height:25px; background-size:15px; display:inline-block !important; } .suffle{background:url(../images/suffle.png) no-repeat left; width:25px; height:25px; display:inline-block !important} .dividr{background:url(http://www.timeshighereducation.co.uk/magazine/graphics/search_icon_big.gif) no-repeat left; width:3px; height:28px; display:inline-block !important; margin:0 8px 10px 0} </code></pre> <p>↪ <a href="http://jsfiddle.net/pUyHA/2/" rel="nofollow">View this code at JSFiddle</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload