PDA

View Full Version : Anylink CSS Menu: Submenu Positioning



dmwhipp
04-22-2010, 07:40 PM
1) Script Title: Anylink CSS Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

3) Describe problem: Submenu positioning

I've begun installing the menu here: http://www.atasteoffrancetours.com/about2.html

Here is my css for the menu so far:

.selectedanchor{ /*CSS class that gets added to the currently selected anchor link (assuming it's a text link)*/
background: #fcb040;
}


/* ######### Default class for drop down menus ######### */

.anylinkcss{
position: absolute;
left: 0;
top: 0;
visibility: hidden;
border: 1px solid #bf2e1a;
border-bottom-width: 0;
font: normal 16px palatino linotype, serif,times new roman;
line-height: 18px;
z-index: 100; /* zIndex should be greater than that of shadow's below */
background: lightyellow;
width: 215px; /* default width for menu */
}

.anylinkcss ul{
margin: 0;
padding: 0;
list-style-type: none;
}

.anylinkcss ul li a{
width: 100%;
display: block;
border-bottom: 1px solid #bf2e1a;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
text-indent: 5px;
font: bold 16px palatino linotype, serif,times new roman;
background: #fcf987;
color: #f57b20;
}

.anylinkcss a:hover{ /*hover background color*/
background: #fcf987;
color: #bf2e1a;
}




/* ######### class for shadow DIV ######### */


.anylinkshadow{ /*CSS for shadow. Keep this as is */
position: absolute;
left: 0;
top: 0;
z-index: 99; /*zIndex for shadow*/
background: #666;
visibility: hidden;
}

Is there any way to adjust the positioning of the submenus so they're a little farther to the right and down just a bit?

Thanks in advance,
Deborah

ddadmin
04-23-2010, 09:49 AM
The link you posted to your site appears broken. In general though, try modifying the below line inside the .js file with the additions in red:


menu.dropmenu.setcss({left:posx+3+'px', top:posy+3+'px', visibility:'visible'})

Change "3" accordingly.

dmwhipp
04-23-2010, 01:15 PM
Hi,
I had gone ahead and removed the test page when the client was satisfied with the menu, but with your instructions to tweak it, it will be perfect.
Thanks,
Deborah