Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Artifacts being left on screen with CSS popup 1

Status
Not open for further replies.

fdarkness

Programmer
Feb 17, 2006
110
CA
I'm using the "pure CSS popup" from it creates a popup box on a hover action, but uses only CSS and no javascript. (I've fixed the bugs in it so it does actually work).

The CSS code I have is:
Code:
div a:hover {text-decoration: none;
	border: none;}

div a span {display: none;
	padding: 5px;
	color: #000000;
	font-size: 12px;
	width: 200px;}

div a:hover span {display: block;
	position: absolute;
	top: 200px;
	left: 150px;
	width: 300px;
	padding: 5px;
	z-index: 100;
	color: black;
	border: red 2px solid;
	background: white;}

and the HTML for it is:
Code:
<div id="popup"><a href="#">Text to MouseOver<span>Text to pop up</span></a></div>

So far, the code works, but the problem is that it leaves artifacts... part of the box that pops up stays visible after leaving the text that's being hovered over and if you mouse over the section where the box popped up, it comes up again!

I've tried playing with the positioning and it seems to only be leaving the artifacts when position = absolute. But I've seen several other samples that use the same thing and don't leave artifacts or pop up again if you mouse over the area.

Any ideas as to what's wrong with this?
 
You think you can give us a link so we can experience this for ourselves?
 
I'd give you a link if I had one, but sadly, the page is on an internal network. Let me see if I can duplicate it at home and I'll post a link to it then.
 
Ok, here's a test page I created with the exact code listed above.


You have to check it in IE. It works perfectly in FireFox, but in IE, it pops up and stays as an artifact (if you scroll or alt-tab to another window and then back, it goes away). And it pops back up if you mouse over the spot it used to be on.

It's looking like some sort of IE quirk, but I have no idea why it would show in my code but not the other samples that I copied this off of!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top