View unanswered posts | View active topics It is currently Fri Nov 15, 2019 1:50 am

Reply to topic  [ 1 post ] 
 Solution to Shifting On Mouse Hover over Div Using JQuery 
Author Message

Joined: Fri Jun 03, 2011 5:49 pm
Posts: 2
Post Solution to Shifting On Mouse Hover over Div Using JQuery

I ran into the problem with IE6 where elements shifted when the mouse hovered over my main div.

The details are described in ... #hasLayout and

I also tried the various solutions from these articles, hasLayout, floats et cetera, but with my particular design, these either did nothing or caused other layout issues.

From my understanding, the root cause is that IE6 is trying to determine the dimensions without fully rendering the page. The mouse over after the page renders results in a correction to the dimensions.

The solution, render the problem div once again after the page completely loaded. I chose to use JQuery to do this,

<script type="text/css">
    .forceRedraw {
         /* Purposefully empty */
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript">
        // only run if Microsoft browser and less then ie7.
        if ($.browser.msie && $.browser.version.substr(0,1)<7) {
            // Resolves IE6 bug "Shifting On Mouse Hover over Div".
            // This forces the #content div to be redrawn after the web page is finished loading.

Fri Jun 03, 2011 9:35 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.