1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Tab menu with <dl> problem - IE issue

Discussion in 'CSS' started by teknoledge, Mar 14, 2007.

  1. #1
    http://flairpair.com/dev/cards/

    The problem is that when you mouse over the tabs, images are loading every time and there is a delay of couple of milliseconds which is really annoying :cool:.

    Everything works good in FF. Anyone has a tip how to prevent this?

    Here is the CSS code for the menu:
    .menu {padding:0; margin:0; display: block; clear:both;}
    .menu dd {float:left; padding:0; margin:0 1px 0 0; text-align:center;}
    .menu dd span.aa {display:block; width:12px; height:20px; background:url(img/m_left.gif); float:left; border-bottom:0px solid #888; padding:5px 0 1px 0;}
    .menu dd span.bb {height:20px; background:url(img/m_bg.gif); float:left; border-bottom:0px solid #888; padding:5px 0 1px 0;}
    .menu dd span.cc {display:block; width:12px; height:20px; background:url(img/m_right.gif); float:left; border-bottom:0px solid #888; padding:5px 0 1px 0;}
    
    .menu a, .menu a:visited {color:#fff; text-decoration:none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight: 700; cursor:pointer;}
    .menu a:hover {color:#fff; background:#fff; text-decoration:none;}
    .menu a:hover span {border-bottom:1px solid #9689c1; text-decoration:none;}
    .menu dd a:hover span.aa {display:block; width:12px; height:20px; background:url(img/m_left2.gif); float:left; border-bottom:0px solid #888; padding:3px 0;}
    .menu dd a:hover span.bb {height:20px; background:url(img/m_bg2.gif); float:left; border-bottom:0px solid #888; padding:3px 0;}
    .menu dd a:hover span.cc {display:block; width:12px; height:20px; background:url(img/m_right2.gif); float:left; border-bottom:0px solid #888; padding:3px 0;}
    Code (markup):

     
    teknoledge, Mar 14, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    That's just IE. It seems not to handle caching background images well at all. A common work-around is to use a single image instead of two or three. Simply shift it right and left or up and down for the :hover effect.
    xxxyyy
    &#160;⇐ ⇒


    xxx ⇑
    yyy ⇓

    cheers,

    gary
     
    kk5st, Mar 15, 2007 IP
  3. teknoledge

    teknoledge Active Member

    Messages:
    408
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    88
    #3
    There must be some hack for IE to fix this :D... Images are stupidly small, all 3 together are 700 bytes.
     
    teknoledge, Mar 16, 2007 IP
  4. SoftCloud

    SoftCloud Well-Known Member

    Messages:
    1,059
    Likes Received:
    28
    Best Answers:
    2
    Trophy Points:
    120
    #4
    You sure it's not just a cacheing problem which is causing it to re-load the image each time?
     
    SoftCloud, Mar 16, 2007 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    That's exactly what it is, see my response, above. There is no fix, only a work-around. By not using different images, and only shifting the one image back and forth, the cache problem is avoided.

    cheers,

    gary
     
    kk5st, Mar 16, 2007 IP