CraigS
02-13-2008, 04:13 PM
I am attempting to combine the vertical list menu found here (http://www.javascriptkit.com/script/script2/verticalmenu.shtml) with the fixed left sidebar and topbar found here (http://www.dynamicdrive.com/style/layouts/item/css-left-and-top-frames-layout/). It almost works. It works in IE7 but fails in every other browser I've tried (IE6, Firefox, and Opera 7 under Linux).
Essentially what happens is when you hover over the vertical menu that is in the left fixed sidebar, the menu pops up but it is transparent so it you can see the content on the page behind it--and when you move the mouse over that popped-up area of the menu, the menu closes. This seems to be because the popped-up area of the menu is actually over the content area of the page.
An example of the behavior can be seen at: http://www.craigsteiner.us/test/index2.php
The component files are obviously index2.php itself and http://www.craigsteiner.us/test/test.css (along with http://www.craigsteiner.us/test/scripts/cssverticalmenu.js, but this JavaScript file is just taken directly from this site as a component of the vertical menu).
I've found that the problem of the menu can be fixed by removing the boldface line from the following segment of the test.css:
#maincontent{
position: fixed; /* THIS IS WHAT CAUSES PROBLEM WITH THE MENU */
left: 120px; /*Set left value to WidthOfLeftFrameDiv*/
top: 72px; /*Set top value to HeightOfTopFrameDiv*/
right: 0;
bottom: 0;
overflow: auto;
}
Of course, removing that line breaks the non-scrolling top/left sidebar aspect of the page. But it seems the vertical menu is being affected by the "Position: fixed" in another area of the page.
Does anyone have any idea what I'm doing wrong? Thanks in advance!
Essentially what happens is when you hover over the vertical menu that is in the left fixed sidebar, the menu pops up but it is transparent so it you can see the content on the page behind it--and when you move the mouse over that popped-up area of the menu, the menu closes. This seems to be because the popped-up area of the menu is actually over the content area of the page.
An example of the behavior can be seen at: http://www.craigsteiner.us/test/index2.php
The component files are obviously index2.php itself and http://www.craigsteiner.us/test/test.css (along with http://www.craigsteiner.us/test/scripts/cssverticalmenu.js, but this JavaScript file is just taken directly from this site as a component of the vertical menu).
I've found that the problem of the menu can be fixed by removing the boldface line from the following segment of the test.css:
#maincontent{
position: fixed; /* THIS IS WHAT CAUSES PROBLEM WITH THE MENU */
left: 120px; /*Set left value to WidthOfLeftFrameDiv*/
top: 72px; /*Set top value to HeightOfTopFrameDiv*/
right: 0;
bottom: 0;
overflow: auto;
}
Of course, removing that line breaks the non-scrolling top/left sidebar aspect of the page. But it seems the vertical menu is being affected by the "Position: fixed" in another area of the page.
Does anyone have any idea what I'm doing wrong? Thanks in advance!