?
Solved

IE flicker image problem for tab menu

Posted on 2006-03-29
4
Medium Priority
?
1,438 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
0
Comment
Question by:fargo
  • 2
  • 2
4 Comments
 
LVL 11

Author Comment

by:fargo
ID: 16324383
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
0
 
LVL 17

Accepted Solution

by:
mreuring earned 2000 total points
ID: 16330211
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
0
 
LVL 11

Author Comment

by:fargo
ID: 16358786
>> 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
0
 
LVL 17

Expert Comment

by:mreuring
ID: 16362622
Hey Fargo,

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

Martin
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

850 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