PDA

View Full Version : omnislide-vertical position top menu



vyvyjim
02-18-2008, 04:03 PM
1) Script Title: omnislide

2) Script URL (on DD): www.dynamicdrive.com/dynamicindex1/omnislide/index.htm

3) Describe problem:
I'm using "omnislide" top menu. However, I want the menu not to be at the very top but a couple of inches down the page. How do I do that?

Thanks,
Jim

jscheuer1
02-18-2008, 07:22 PM
I'm hoping that you know your way around a text-only editor when working with HTML code. If so, you can use design mode for the menu and get its styles and HTML. Copy that to your page and modify it, then use that instead of the script generated styles and markup.

Alternatively, with just a simple style addition, the menu may be moved down, but something else in your layout will need to cover the top portion of it.

Like, say the menu's id is menu2, as configured in the menuItems.js file:


. . . UIRED!! do not edit or remove

menu[2] = { // REQUIRED!! This menu explicitly declares all available options even if they are the same as the defaults
id:'menu2', //use unique quoted id (quoted) REQUIRED!!
//////////////////// . . .

Then you can add a style section below the scripts in the head of your page:


<script src="mmenu.js" type="text/javascript"></script>
<script src="menuItems.js" type="text/javascript">

/***********************************************
* Omni Slide Menu script - John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
* very freely adapted from Dynamic-FX Slide-In Menu (v 6.5) script- by maXimus
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full original source code
***********************************************/

</script>

<style type="text/css">
#menu2 {
top:40px;
}
</style>

Then you just need to have something else on your page that is fixed positioned with a z-index over 100, something like so to cover the part of it you don't want to see:


#some_other_id {
position:fixed;
z-index:101;
top:0;
height:40px;
width:100%;
background-color:white;
}

Except for IE 6, which would need absolute positioning and an expression, something like:


<!--[if lte IE 6]>
<script type="text/javascript">
function ie_st(){
return document.documentElement.scrollTop+'px';
}
</script>
<style type="text/css">
#some_other_id {
position:absolute;
top:expression(ie_st());
}
</style>

<![endif]-->

vyvyjim
02-18-2008, 08:38 PM
Thanks much!!!!!!!!!!!

Jim