PDA

View Full Version : re: anylink CSS menu positioning



ChasDevlin
05-19-2005, 05:01 PM
anylink css menu (http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm)

Really nice and even more manageable than the anylink dropdown, but is there a way to position the menu so it's not so tight up against the link?

Currently, the menu drops right below it... but can it be altered so it's a few pixels lower? I've tried positioning the dropdown in the .anylinkcss style but it doesn't work.

Just curious... thanks.

jscheuer1
05-19-2005, 06:47 PM
This line controls the vertical position of the drop down:

dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"to get it a little further down, just add to it like:
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+5+"px"This will affect the positioning in those situations where the drop down must drop up so, you should compensate by also changing:
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeightby an equal yet, opposite value to (in this case):

edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight-5Just to clarify, this second change deals with the vertical position of the drop down when the menu is so close to the bottom edge of the browser that it needs to 'drop up' in order to be visible.

ChasDevlin
05-19-2005, 08:19 PM
help much appreciated. thank you! it works like a charm.