Jim R Posted December 5, 2017 Share Posted December 5, 2017 Here is my to generate a list, which is hidden other than a link (Offers) to signify there are existing offers. echo '<div class="colleges">[<a href="#"><span class="lists">Offers</span></a>]</div>'; echo '<div id="list">'; // Turn CSV into unordered list $offersList = $line['colleges']; $offersList = explode(", ",$offersList); asort($offersList); foreach ($offersList as $offers) { echo '<li>' . $offers . '</li>'; } echo '</div>'; } When a User hovers over the [Offers] link, I'd like the list to show up: #list { display: none; } #list a:hover { display: block; } Nothing changes when I hover over Offers Quote Link to comment Share on other sites More sharing options...
requinix Posted December 5, 2017 Share Posted December 5, 2017 Hovering over the link is annoying. Hovering over the div.colleges is easy: div.colleges:not(:hover) + div.list { display: none; }Get rid of the #list ones you have now, and use a class instead of an ID. Quote Link to comment Share on other sites More sharing options...
Jim R Posted December 5, 2017 Author Share Posted December 5, 2017 Very nice...thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.