views:

52

answers:

4

Hi, I'm creating a site where I've encountered a huge IE lag when hovering over the menus. I'm using Cufon in combination and it seems like it's causing a huge lag when I apply height, width, margins or paddings to the li:hover element.

So, I need to figure out a smart way of doing this otherwise. The site is here, http://w3box.com/mat

You can clearly see the menu I guess. So, what I want is to push the entire menu downwards so it's like 3 or 4 pixels above the bottom of the height line. So it matches about the same vertical position as the logo font to the left.

Then, I want the hover effect to be larger in height. Hard to explain, but when hovering over a menu item, imagine a box where the text is positioned at the very bottom of the box. Like this;

http://img710.imageshack.us/img710/2791/menuheader.jpg

Now, you may notice the arrow looking thingy sticking at the bottom. I don't really need that, but if you have any idea on how to do it, I'd appreciate the help! ;)

A: 

Omit the h4 in the menu since i think it is not needed. Than set display:block on <a> and use line-height and padding-left , padding-right to make the anchor expand the right size. Also notice that li:hover is not supported in IE6/7 without some tweaks. To position the menu on same level as logo just set a margin-top on ul element.

easwee
Yeah, I didn't use the <h4> at first, I just tried it out since I saw on an example of Cufon that it was done, because Cufon and IE has trouble with <ul> or something. Don't know, will probably throw it out. Ok, I'll try out your tips here :) I'll come back to you.
Kenny Bones
A: 

Hi,

There're too many rules for me, too many useless rules. Don't have the time to correct all and test it on FF/IE, but this works ofr example : .menuwrapper li { float:right; list-style: none; padding: 30px 23px 3px 23px; position: relative;
top: 7px; }

Alysko
A: 

What about vertical-align?

TiuTalk
+1  A: 

Hi, I have not tried, but I think this may be an option.

You have everything with in one div, why dont you try to put div with in divs?

this is your current code for header.

<div id="header">  
                <img class="LogoChef" src="img/LogoKokk2.png" alt="Logo"/> 

                <img class="LogoMatkalender" src="img/MatkalenderLogo.png" alt="Logo"/>                     


                    <ul class="menuwrapper"> 
                        <li><h4><a href="#">Logg ut</a></h4></li> 
                        <li><h4><a href="#">Kontakt</a></h4></li> 
                        <li><h4><a href="#">Kontrollpanel</a></h4></li> 
                    <li><h4><a href="#">Oppskrifter</a></h4></li> 
                    <li><h4><a href="#">Hjem</a></h4></li> 
                    </ul> 



            </div> 

You can try something like this, so you have more control over the different objects.

<div id="header" style="float:left;vertical-align:bottom">  
<div id="imgChef">
    <img class="LogoChef" src="img/LogoKokk2.png" alt="Logo"/> 
</div>
<div id="imgMat" style="float:left;vertical-align:bottom">
    <img class="LogoMatkalender" src="img/MatkalenderLogo.png" alt="Logo"/>                     
 </div
 <div id="menu" style="float:right;vertical-align:bottom">
<ul class="menuwrapper"> 
<li><h4><a href="#">Logg ut</a></h4></li>                                                              <li><h4><a href="#">Kontakt</a></h4></li> 
<li><h4><a href="#">Kontrollpanel</a></h4></li> 
<li><h4><a href="#">Oppskrifter</a></h4></li> 
<li><h4><a href="#">Hjem</a></h4></li> 
</ul> 
 </div>


</div> 

I am not sure that may be the right combination, but I think with the three divs inside the div you will gain more control over the elements inside the header div.

Cesar Lopez
Ah, that sounds kinda logical :) Without too much hassle either.I might create a class for them though, if they have identical properties. I'll try this in a bit :)Any idea on how to get that downwards arrow? Don't know if it's possible, since that would require three divs or something, inside one <li> element. Where the middle one is centered. Which is probably impossible?
Kenny Bones
The first think is that you may want to apply the hover effect to the "a" element insted the "li" element so....menuwrapper a:hover { background-image: url(img/MenuHover.png);}instead of.menuwrapper li:hover { background-image: url(img/MenuHover.png);}Then I think what you need is .menuwrapper a:active {background-image: url(img/MenuHoverWithArrowInTheMiddle.png)} /* selected link */of course you will need to create that new image.This will put the image with the arrow when user select the link.
Cesar Lopez