Superfish hover is not 100% in IE7

Permalink Browser Info Environment
Hi all,

I am using Superfish and I seem to have a minor problem in IE7 with the hover states and the spacing between the menu items. It only seems to be on second level navigation. (See screenshot)

Any ideas?

Ben

1 Attachment

Type: Discussion
Status: Archived
bencox
View Replies: View Best Answer
MattWaters replied on at Permalink Reply
MattWaters
I can see that the spacing's a little wide on the sub-items and the background is showing through. Sort of looks like there's a box-shadow property set on the sub-item blocks.

Could you pass along a url for me to check out?
bencox replied on at Permalink Reply
bencox
http://www.sitemirror.co.uk/farrowcreative/NigelBrooks/

I will PM you the login/password

Cheers

Ben
MattWaters replied on at Permalink Reply
MattWaters
I couldn't reproduce the issue in Chrome, Firefox or Safari, but it seems related to the background image / shadow on .sf-shadow ul

It might look better without the shadow. If you're comfortable editing the CSS, open packages > superfish > blocks > superfish > css > superfish.css and try commenting out line 129:

/* background:   url('../images/shadow.png') no-repeat bottom right; */
bencox replied on at Permalink Reply
bencox
Thanks Matt

I will take a look.

Ben

Sphere IT Solutions
Phone: 01252 416423
Mobile: 07810 548464
Skype: ben.cox

Sent from my iPhone
bencox replied on at Permalink Reply
bencox
Matt,

It makes no difference to it I am afraid. What I cannot seem to work out is why it is only on the second level of the nav. I am going to add another 3rd level page and see if it is doing it there as well.

Cheers

Ben
bencox replied on at Permalink Reply
bencox
It does the same with the 3rd level of nav as well.

This is confusing me.
MattWaters replied on at Permalink Reply
MattWaters
Hmm...when you disabled the shadow img, there was still a gap between menu items?

Feel free to attach another screenshot if it's difficult to describe.
bencox replied on at Permalink Reply
bencox
Matt

Yes. The gaps were still there. :(

Ben

Sphere IT Solutions
Phone: 01252 416423
Mobile: 07810 548464
Skype: ben.cox

Sent from my iPhone
MattWaters replied on at Permalink Reply
MattWaters
Thanks for trying that. I'll do a little more testing in IE here and see if I can figure out a workaround.
bencox replied on at Permalink Reply
bencox
Thanks Matt.

I also tried reducing the padding on the line just below that background image line.

Cheers

Ben

Sphere IT Solutions
Phone: 01252 416423
Mobile: 07810 548464
Skype: ben.cox

Sent from my iPhone
MattWaters replied on at Permalink Reply
MattWaters
I noticed that in all sub-items there's a div with the class ccm-spacer. looks like it's part of the c5 auto-nav. it has a line-height, but maybe try setting it with a plain old height declaration-- 0 or 1px?
bencox replied on at Permalink Reply
bencox
Matt,

I will try that and test in tomorrow when I get back in the office, thanks.

Ben
MattWaters replied on at Permalink Reply
MattWaters
add something like

.ccm-spacer {
height: 0;
}


and see if that helps...
bencox replied on at Permalink Reply
bencox
Guess what? No luck on that either.
bencox replied on at Permalink Reply
bencox
Matt,

I am partly there. I have fixed the hover where the background was not filling the full width of the nav. I removed the min-width from the <a>. Seems to work in all browsers.

Still confused with the extra space though. Have spent a good while looking at the CSS. :(
MattWaters replied on at Permalink Reply
MattWaters
Nice detective work! Not sure if this is related to the issue you're having, but I came across this thread a moment ago:

http://www.mail-archive.com/jquery-en@googlegroups.com/msg45061.htm...
bencox replied on at Permalink Reply
bencox
I have looked at that. I think I have looked at everything now! Have asked the client to look at it and see if acceptable :) fingers crossed.
MattWaters replied on at Permalink Reply
MattWaters
Good luck. One tip I've read to is make sure all your list elements are set to display: block. If any are left to their defaults, IE gets funky.

I also came across this big matrix of IE list display behaviors:

http://www.brunildo.org/test/IEWlispace.php...
dekelly replied on at Permalink Reply
dekelly
Hi Ben,

I'm having the exact same problem in IE7

1. Submenu list items have gaps between them.
2. Submenu second level, second list item hover is not filling full width of background.

Can you tell me if you were able to fix this gaps issue in IE7 for superfish? I tried looking for min-width associated with the <a> tag but didn't have any rule in the superfish.css or view.php that was associated with this. I have spent all day trying to get a dropdown menu and tweaking so that it works across all the browsers.

My site is still in beginning stages.
http://66.147.242.198/~eirecojp/...

As a separate issue, I want to highlight the text to green as I hover over the submenu items but have had no luck there either! Its so straightforward in a css drop down menu. I am able to set font-size etc for <a> but nothing for a:hover. I am using cufon so Im not sure if there is a conflict there. nav.selected property is correctly showing bold but I could not change the colour of this either.

Would appreciate any comments.
geek2009 replied on at Permalink Reply
geek2009
I have also been having the same problem in IE7.
geek2009 replied on at Permalink Reply
geek2009
*Delete
bencox replied on at Permalink Reply
bencox
Hi guys

I am away from the office until Tuesday. I will take a look at the problems y=
ou have then if nobody else has been able to resolve in the mean time.=20

I did not have any luck with the extra spacing but perhaps between us we can=
sort it :)

Cheers


Ben
=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94

Sphere IT Solutions

01252 416423
07810 548464

Sent from my iPad.

On 23 Jan 2011, at 16:27, Concrete5 Community <discussions@concretecms.com> w=
rote:

>=20
MattWaters replied on at Permalink Reply
MattWaters
Has anyone tried a negative margin on these menu gaps?

Might have to do some trickery to make it affect only IE:

http://css-tricks.com/how-to-create-an-ie-only-stylesheet/...
dekelly replied on at Permalink Reply
dekelly
Have found the cause but not the solution yet - its the auto vs fixed width settings for the top level in the superfish editable properties window.

If you set it to "Fixed" - all the problems in both ie6 and ie7 disappear (gaps between li items in ie7 and the changing cell widths and incorrect hover width/sub-indicator positioning in ie6 ). Setting the top level to fixed means the width becomes the value that is specified in view.php, line 6. At the moment mine is 135px and consequently, the top level list items are then spaced too far apart so this has to be specified separately.

My dev site url ishttp://66.147.242.198/~eirecojp/index.php...

I have only changed the superfish top level menu width setting to "fixed" for the top page. All the other pages are still set to auto and thus are manifesting the bugs in IE6 and IE7.
bencox replied on at Permalink Reply
bencox
Great, I will have a look at this on my site and see what happens.

To be honest I was being too fussy about the appearance, the client did not even notice!!

Cheers

Ben
MattWaters replied on at Permalink Reply
MattWaters
Cool, thanks for sharing what you've found. IE in general seems to require specificity for these dropdowns-- probably means it interprets css inheritance differently from other browsers.

Modifying the css stylesheet manually seems like the only way to get this stuff to line up in IE, and even then it's a matter of trial and error.
WebStudioEast replied on at Permalink Best Answer Reply
WebStudioEast
I've fixed both the submenu gap problem and the hover problem:

To fix the submenu gap you need to alter the first rule in the superfish.css file so that it looks like this:

.sf-menu, .sf-menu * {
   margin:0;
   padding:0;
   list-style:none;
   vertical-align: bottom; /* GAP FIX */
}


To fix the hover issue you need to eliminate the positioning from the container div that you have the navigation in. There is some IE bug with lots of relatively positioned divs that is messing it up.

I removed
position: relative;

from my css and now everything works properly.

This is my code in my header.php theme file:
<div id="navigation">
      <?php $a = new Area('Navigation Area');$a->display($c);?>
   </div>


And here is my CSS:
#navigation {
   border: 1px solid #CCC;
   width: 884px;
   height: 28px;
   margin: 10px;
   padding: 0 0 0 72px;
   float: left;
   clear: both;
   overflow: visible;
   color: #680B15;
   font-weight: bold;
}


Stupid IE!

Please let me know if this helps anyone else!
julia replied on at Permalink Reply
julia
This works great. Crush, do you want to submit this as a how-to document? Here's where you'd do that:http://www.concrete5.org/profile/howtos/post...
dekelly replied on at Permalink Reply
dekelly
Thanks for the solution and the clear explanation :-)
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.