PDA

View Full Version : Centering Drop Down Menu



mmd
03-24-2005, 02:52 PM
I'm new at this and have looked over and haven't found the answer to this question.

I'm working on the drop down menu at

http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

I want to center the actual down down menu box not the text when you click on the image. Is this possible?

jscheuer1
03-25-2005, 10:56 PM
If I understand you, you want to center the content that drops down from this menu. I think that would look bad but, it is your page. The way to do that is to find these two lines in the script:


dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")change them to this:


dropmenuobj.x=75
dropmenuobj.y=20the x is how many pixels from the left the drop down will be, the y is how many pixels down it will appear. These values worked for the example on the developer's view page. You may have to adjust them to get the effect you want with your menu. Just as an explanation, the way the code is without these modifications allows these drop downs to appear adjusted for where the were called from on the text links.