Jump to content

Trying to get a DIV to show up on a hover state...


Recommended Posts

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

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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.