CSS hover blinking in FF

Posted on 2008-10-28
Last Modified: 2010-05-18

I am trying to show an image when hovering an another one - images are not one on top of the other. It does work in IE7 but it is blinking horribly in FF.

Any help or reason why it is doing so will be appreciated.

Thank you
Here is the CSS

<style type='text/css'>





	position: absolute;

	font-family:  'Trebuchet MS', Helvetica, serif;

	font-size: .8em;

	background-image: url(accueil_2.gif);

	background-repeat: no-repeat;


	background-position: left top;

	width: 950px;

	height: 500px;


.cie {

	font-variant: small-caps;



	font-style: italic; 

	text-align: center;

	border: none;}

#infocle {

	position: relative;

	/*(top: 100px;*/

	width: 150px;

	padding-right: 15px;

	margin-left: 15px;

	z-index: 200;}


	position: absolute;

	top: 240px;

	left: 200px;

	width: 304px;

	height: 180px;

	margin: 0;

	padding: 0;

	z-index: 1500;	}

/*paramétrer la liste*/

#livres li {

	display: block;

	list-style: none;}

/*paramétrer les a*/

#livres a {

	display: block;

	/*text-indent: -9999px;*/

	text-decoration: none;

	outline: none;

	cursor: default;}

/*position qui réagit au hover*/

.pn {left: 0px; top: 0px; width: 304px; height:45px; z-index: 1500;}

.fg {left: -5px; top: 45px; width: 304px; height:45px; z-index: 1500;}

.et {left: -5px; top: 90px; width: 304px; height:45px; z-index: 1500;}

.fl  {left: -5px; top: 135px; width: 304px; height:45px; z-index: 1500;}

/*hauteur du rectangle du Anchor*/

.pn a {height: 45px;}

.fg a {height: 45px;}

.et a {height: 45px;}

.fl a {height: 45px;} a:hover {

	display: block;

	position: absolute;

	top: 0px;

	left: 600px;

	width: 86px;

	height: 115px;

	background: url(livre_pn.gif);

	background-repeat: no-repeat;

	} a{

	display: none;


div.fg a:hover {

	position: absolute;

	top: 0px;

	left: 600px;

	width: 86px;

	height: 115px;

	background: url(livre_avenir.gif);

	background-repeat: no-repeat;



and the html



<div id='livres'>



			<div class='pn'><a href=> <span>pn</span></a></div>

			<div class="fg"><a href='#'><span>fg</span></a></div>	

			<div class="et"><a href=><span>et</span></a></div>	

			<div class="fl"><a href='><span>fl</span></a></div>





Open in new window

Question by:LearningLover
  • 2
  • 2
LVL 42

Expert Comment

by:David S.
ID: 22824319
It's doing that because the link moves out from under the cursor and then moves back under the cursor and it repeats over and over again, which makes the blinking affect.

Author Comment

ID: 22824713
Thank you for your answer.

However, it doesn't explain that IE7 is not blinking.

Is there any other way to do this ?

LVL 42

Accepted Solution

David S. earned 500 total points
ID: 22826935
Different browsers handle things differently. There doesn't seem to be a better explanation or this one.

Sure, there's another way. Add another <span> around all of the contents of each <a> and move it instead of the <a>.

Author Closing Comment

ID: 31510798
Thank you for your clue. Actually it did not work with an added span. However you put me on a trail to do something else. I put the image with an ID, float the image and now I have no problemos !

Thanks again.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now