Click to See Complete Forum and Search --> : Scrolling Menu


MCP
12-29-2003, 09:36 PM
I'm trying to set up a scrolling menu. For some reason, it's working in Netscape, but not in IE. Any suggestions or ideas to get it working in IE would be greatly appreciated. I think it may be aproblem with my <div> tag, but I'm not sure.
if(preg_match("/MSIE/",$_SERVER["HTTP_USER_AGENT"])) // check IE is being used
print("<div id=\"extra\" style=\"position:absolute; visibility: show; left: 50;
top: 90px; z-index:2; width:50px; height:15px; overflow: hidden;\"
onMouseOver=\"big('extra');\" onMouseOut=\"small('extra');\">\n"); // starts extra menu
else
print("<div id=\"extra\" style=\"position:fixed; visibility: show; left: 50;
top: 90px; z-index:2; width:50px; height:15px; overflow: hidden;\"
onMouseOver=\"big('extra');\" onMouseOut=\"small('extra');\">\n"); // starts extra menu

fredmv
12-29-2003, 11:49 PM
I'm not sure if this relates to your problem, but show isn't a valid value for visibility (I think it was only correct in Netscape 4.x). Use either visible or hidden to toggle the visibility of the element.

MCP
12-30-2003, 12:00 AM
I replaced visibility: show; with visibility: visible; for IE browsers, but the menu still isn't scrolling down when I scroll the window down. That is, when the user scrolls down the window, the division, which this menu is in, is suppose to remain stationary on the screen, or appear to scroll down the window as the user scrolls, so that it is always visible.

fredmv
12-30-2003, 12:03 AM
Nevermind, sorry for my previous post; I didn't understand exactly what the problem is, however, it's good that you corrected that. I'll explain why it doesn't work: because IE sucks. It doesn't support fixed as a valid value for the position property. Therefore, you have to emulate it (http://devnull.tagsoup.com/fixed/). ;)

MCP
12-30-2003, 12:41 AM
This is the <div> tag of the other scrolling menu (that works) as it's generated for IE.<div id="chimenu" style="position:absolute; visibility:visible; left:50px;
top:120px; z-index:2">This is the <div> tag of the scrolling menu that isn't working in IE. It's almost identical, except for some added properties, which are there to handle the menu's collapsing feature.<div id="extra" style="position:absolute; visibility:visible; left:50;
top:90px; z-index:2; width:50px; height:16px; overflow:hidden;"
onMouseOver="big('extra');" onMouseOut="small('extra');">The first one works in both IE and Netscape, but the second one, isn't working in IE. :confused:

PeOfEo
12-30-2003, 01:51 AM
/* */ comment out each attribute, do a trial error and see what it gives you. Could you describe what is going wrong of give a link?

MCP
12-30-2003, 02:08 AM
Removing out the width and height attributes simply took away the menu's ability to quickly size correctly; the big() and small() functions also handle that. Removing, the overflow attribute disabled the menu's ability to 'popup' or hide the bulk of the menu. The big() and small() functions are absolutely neccessary for the functionality of what I want this menu to do.

PeOfEo
12-30-2003, 03:08 PM
overflow can be used to put elements behind one another. To make the menu popup out of no where just change the visibility.

MCP
12-30-2003, 10:19 PM
Originally posted by PeOfEo
overflow can be used to put elements behind one another. To make the menu popup out of no where just change the visibility.
That's not the propblem; the popup feature is working. What is not working is the menu isn't staying in place as the user scrolls the window in the IE browser.

PeOfEo
12-31-2003, 12:40 AM
why do you mean? You want it to stay 10px from the top of the browser window, not the top of the page, as the user scrolls? If that is the case put all the content in an auto overflow div and let the user scroll around in that or use frames because if you want the thing to move down with the user it is going to be jumpy. If this is not what you are going for what do you mean it doesnt stay in one place?
EDIT: OK I checked my PMs I see what you mean. The jumpyness is inevitable. You can use a frame or put the content in a div that has 100% height and width and create the illusion of the page its self scrolling though, and then just not have the extra code to fix the menu there.

MCP
12-31-2003, 01:26 AM
I just got a new request from the person for whom I'm making the site to remove the scrolling menus. Thanks for the help, everyone! :D

PeOfEo
12-31-2003, 09:37 AM
heh, ok. They seemed to be a bit inaccessable anyway.:D