Jump to content

Placement of hover messages seems affected by scrolling down


niche

Recommended Posts

Placement of my hover messages seem to be affected as I scroll down the page. Before scrolling down, placement of my hover messages are adjacent to the button that creates the hover. As I scroll down the page, the hover messages are no longer adjacent to the button that produces it. What's the issue? Here's my PHP code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><?php session_start(); ?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="description" content="Save money" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>ebop </title><style type="text/css">.button {margin:0px;padding:0px;width:60px;height:60px;font-size:12px;vertical-align:top;}.message {position:fixed;margin:10px 0px 0px -5px;background:white;width:100px;display:none;border-style:solid;border-width:4px;}.div{margin:0px 0px 0px 0px;float:left;overflow:visible;width:595px;height:420px;border-style:solid;border-width:4px;}.wrapper{width:595px;}button.button:hover div.message {display:block;}</style></head><body><?phpecho '<div class="wrapper">';  echo '<div class="div">';	echo '<button class="button" >Item Info';	  $item_info = "jh,kj hkhlh,kj, kh.,kj. lj,l. jhj.h ,j;jjh.";		  echo '<div class="message">' . $item_info . '</div>';	echo '</button>';  echo '</div>';  echo '<div class="div">';	echo '<button class="button" >Item Info';	  $item_info = "jh,kj hkhlh,kj, kh.,kj. lj,l. jhj.h ,j;jjh.";		  echo '<div class="message">' . $item_info . '</div>';	echo '</button>';  echo '</div>';  echo '<div class="div">';	echo '<button class="button" >Item Info';	  $item_info = "jh,kj hkhlh,kj, kh.,kj. lj,l. jhj.h ,j;jjh.";		  echo '<div class="message">' . $item_info . '</div>';	echo '</button>';  echo '</div>';echo '</div>';?></body></html> 

Edited by niche
Link to comment
Share on other sites

position:relative; I was experimenting last night and forgot to change it back. Thanks for reading this topic.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...