We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

IE flicker image problem for tab menu

fargo
fargo asked
on
Medium Priority
1,454 Views
Last Modified: 2008-01-09
Hi All,

The following css style makes a flicker when i hover over the tabs. It works fine with firefox, Any ideas?

      body {
                  background:#fff;
                  margin:0;
                  padding:0;
                  color:#000000;
      }

      #header {
                  float:left;
                  width:100%;
                  background:#BBD9EE;
                  padding:0;
                  font-size:0.8em;
                  line-height:normal;
      }
      #header ul {
                  margin:0;
                  padding:10px 0 0 10px;
                  list-style:none;
      }
            
      #header li {
                  display:inline;
                  margin:0;
                  padding:0;
      }

      #header a {
            float:left;
            background:#E7F1F8 url("../images/tabs.png") left top no-repeat;
            padding:0 0 0 9px;
            text-decoration:none;
            font-weight:normal;
            color:#000000;
      }
      #header a span {
            float:left;
            display:block;
            background:#E7F1F8 url("../images/tabs.png") right top no-repeat;
            padding:4px 15px 3px 6px;
            text-align:center;
      }
      /* Commented Backslash Hack hides rule from IE5-Mac \*/
      #header a span {float:none;}
      /* End IE5-Mac hack */

      #header #current a span {
            padding-bottom:4px;
            font-weight:bold;
      }
      #header a:hover, #header a:hover span {
            background-color:#FFFFE6;
            color:#000000;
      }
      #header #current a span, #header #current a {
            background-color:#ffffff;
      }

Following is the html used

<ul id="header">
<li id="current"><a href="#"><span>Home</span></a></li>
<li><a href="#"><span>Services</span></a></li>
<li><a href="#"><span>About us</span></a></li>
<li><a href="#"><span>Contact us</span></a></li>
</ul>

Thanks for your help.

fargo
Comment
Watch Question

Author

Commented:
Hi,

One can have a look at the following
http://www.fiftyfoureleven.com/sandbox/doors-meets-mountaintops-3/

the hover is flickering (only in IE). How one can fix it?
Any idea fellas?

fargo
Commented:
Looks nice :) And indeed, when I set my caching to 'every visit to page' IE starts reloading the bloody image on every change. Supposedly this can be prevented by providing more interresting caching information about the images.
In theory your server could instruct browsers that the image has not changed since 1980 and won't be changed for years to come, thus preventing IE's reload behaviour. I'm not particularly sure it this works however. Also, taking into account the general populace, who will never touch their settings concerning caching, this behavious only occurs to a minority and mostly will entail developers, who should know better.
Anyway, this is the digested take on this topic, for more info and aditional workarounds I recommend this link:
http://www.fivesevensix.com/studies/ie6flicker/

Good luck,

 Martin

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
>> In theory your server could instruct browsers that the image has not changed since 1980 and won't be changed for years to come, thus preventing IE's reload behaviour. I'm not particularly sure it this works however.

I preferred it then. -:)

keeping aside my no good detailed expertise in CSS,  i preferred to go with server side logic handling. I use Servlet Filter for not changing the response headers for the images etc. It then prevents IE to reload the images and it works fine then.

fargo

Commented:
Hey Fargo,

Glad I could help and good to hear that sending the proper response headers works in practice!

Martin
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.