Solved

CSS hover blinking in FF

Posted on 2008-10-28
4
1,138 Views
Last Modified: 2010-05-18
Hi,

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'>

*{

	margin:0;

	padding:0;}

body{

	position: absolute;

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

	font-size: .8em;

	background-image: url(accueil_2.gif);

	background-repeat: no-repeat;

	background-attachment:fixed;

	background-position: left top;

	width: 950px;

	height: 500px;

	}

.cie {

	font-variant: small-caps;

	}

.pensee{

	font-style: italic; 

	text-align: center;

	border: none;}

#infocle {

	position: relative;

	/*(top: 100px;*/

	width: 150px;

	padding-right: 15px;

	margin-left: 15px;

	z-index: 200;}

#livres{

	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;}
 

div.pn a:hover {

	display: block;

	position: absolute;

	top: 0px;

	left: 600px;

	width: 86px;

	height: 115px;

	background: url(livre_pn.gif);

	background-repeat: no-repeat;

	}

div.pn 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;

	}

</style>
 

and the html

<body>

 

<div id='livres'>

<ul>

		<li>

			<div class='pn'><a href=http://www.info-cle.ca/personnel/bib_pers.nsf> <span>pn</span></a></div>

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

			<div class="et"><a href=http://www.info-cle.ca/et/bibliotheque.nsf><span>et</span></a></div>	

			<div class="fl"><a href=http://www.info-cle.ca/et/fichelectures.nsf'><span>fl</span></a></div>

		</li>

</ul>

</div>
 

</body>

Open in new window

0
Comment
Question by:LearningLover
  • 2
  • 2
4 Comments
 
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.
0
 

Author Comment

by:LearningLover
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 ?

TIA
0
 
LVL 42

Accepted Solution

by:
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>.
0
 

Author Closing Comment

by:LearningLover
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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

744 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

12 Experts available now in Live!

Get 1:1 Help Now