Hi, last time I got really fast and working solution here so maybe someone can help me again. I have been searching for that for few hours but none of the advices actually helped.
I have a web page with vertical "flyout" menu. I have 3px margin among items both in the first level and in the sub-menu. It is working fine in Firefox or Chrome but not in IE. When I have cursor over the margin between items in sub-menu in IE the whole sub-menu immediately disappears.
Is there any way how to solve this?
Here are the codes.
Thank you.
Which IE version? And which doctype do you have over the page?
__________________ Frank
How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.
It's in IE9 and <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Try this type:
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
And you shouldn't use rgba colors yet -- IE8 and lower do not support that.
__________________ Frank
How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.
Thanks for answer. It seems that it works better, I have the sub-menu visible when I have the normal paragraph under, but it still disappears when I have a hyperlink in the margin. Maybe it is a simple problem, but honestly I even don't know how exactly the change of doctype has helped
And about the colors, isn't it like that if I use rgba, the IE just takes it like rgb? If not, could I use something like this?
Code:
#menu ul a {
display:block;
padding:2px 5px 2px 10px;
background: rgb(255, 153, 0);
background: rgba(255, 153, 0, 0.4);
}
Thanks for answer. It seems that it works better, I have the sub-menu visible when I have the normal paragraph under, but it still disappears when I have a hyperlink in the margin.
What do you mean with that, the normal paragraph under and a hyperlink in the margin? Do you have it online already?
Quote:
Maybe it is a simple problem, but honestly I even don't know how exactly the change of doctype has helped
To be honest: neither do I. It was just checking for doctype because with a non-standards type, IE uses a different box model. Which can lead to gaps which, if hovered over those gaps, make sub menus disappear. However, I do see a lot of hover lines in your CSS code. The code can be much simpler. See the fourth tutorial on my signature page, which explains a flyout menu that is fully cross-browser.
Quote:
And about the colors, isn't it like that if I use rgba, the IE just takes it like rgb? If not, could I use something like this?
Code:
#menu ul a {
display:block;
padding:2px 5px 2px 10px;
background: rgb(255, 153, 0);
background: rgba(255, 153, 0, 0.4);
}
No, then it will try to render the last line as well, but will fail. You will have to work with a conditional stylesheet, or use the conditional html tag class method that I used on www.conijnconsultancy.com.
Well I have it online here
But so far I have been using exactly this conditional stylesheet you are talking about and I have left out those margins which had been causing problems.
If you open it in another browser you can imagine that the submenu under the option 'Město' disappears in IE every time I cross over the margins in submenu and I have open precisely the web page which I have mentioned in the beginning of this message.
Well, I have tested it with IE7, 8 and 9, all updated (not upgraded) real versions on old(er) machines, but it works in all of them. Does the problem still exist on your machine, and if so: how exactly do you test it?
But that is probably because I had there the conditional stylesheet you shouldn't have seen the margins. I deleted the stylesheet for IE now so if you go on here you should see the same webpage as in the other browsers.
If I open this web page and cross over 'Město' option and then move the cursor over those four options which appear in the submenu, it disappears when the cursor is on the hyperlink 'under' this submenu. I mean in the body itself. And the hyperlink is visible because of those margins. I hope it is understandable how I said that
OK, the submenu disappears if the pointer is between submenu items. Is that what you mean? If so, what happens if you change the doctype like I suggested and take out all the conditional stylesheets?
Another thing: hover of the left hand side of the submenu items, so left of the text links, and you will see that the submenu stays. Like I suggested, that is due to a for IE (in quirks mode) confusing set of :hover lines in the CSS.
Yes that's exactly what I mean. So I've changed the doctype and took out the conditional stylesheet for this page.
But at least in my IE the submenu still disappears. I've also noticed that while hovering over submenu items but not over the text links inside them everything is fine. So is the change of doctype the only way how to resolve those "confusing lines"? However, IE shouldn't open this page in quirk mode now, should it?
Strange. In my code editor in IE8 Preview mode, a different doctype makes all the difference, but in a real IE8 it indeed makes no difference -- the problem stays, even with a standards doctype.
That means that, assuming you want spaces between the items, you will have to rewrite the CSS, taking out the double :hover lines. The good news is that that is really easy if you follow my tutorial, even if I say so myself. It is the last tut linked from my signature page.
Let me know when you have succeeded, if you will.
__________________ Frank
How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.
I think that in some part of making the web page I was using your tutorial even without your reference Anyway, I simplified the css code to the state that only those lines are in:
Code:
#menu ul
#menu ul a
#menu ul li
#menu ul li:hover ul
#menu ul ul
But at least in my case the submenu still doesn't work as you can see here
Either with xhtml doctype or the standard one.
OK, one more message, but I don't have time for more.
If you test the menu on http://www.website-laten-maken-amste...nu_vert_2.html you will see that it is cross-browser, even with huge gaps between the sub menu items. Then, if you compare my source code with yours, you will see some significant differences. You are not using relative-absolute positioning, for example.
Just rewrite your code from scratch according to my tut, and your menu will be cross-browser, too. It shouldn't take you more than half an hour. Good luck.
Well I've made a special css just for this site and take out all the lines you don't have there. I think I have it really similar. I have the inline-block and relative-absolute positioning in the same lines as you.
But that ain't matter. I'll try to think about it once more during the weekend and if I don't succeed I will use the conditional stylesheet. Hopefully not a lot of people is using IE nowadays
Thank you a lot for your time and help anyway. I really appreciate that