Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:50

padding left and right


Poster: risingsun
Dated: Thursday March 17 2005 - 1:47:12 GMT

I am currently redesigning a site and I'm having problems trying to figure out how to add left and right padding to the menu item. The only way that it's currently working is by adding ( ) next to my text.

I've tried using the "padding=5 15 5 15;" and "rawcss" but nothing seems to work. If anyone has any suggestions, please let me know.

My test page

Thanks in advance.
RS


Poster: kevin3442
Dated: Thursday March 17 2005 - 4:44:49 GMT

Hi RS,

I've used the method discussed in this thread successfully. It sounds like you must've tried that without success, but maybe you didn't get the syntax just right. I just downloaded the menu_data.js from your test page and tried it here, and it worked in IE6, FF1.0 and NS7.1.

You can use this approach in your menuStyle, or on an item-by-item basis in the aI() string. For example, if you wanted all of the items in menus that use the style named "menuStyle" to have padding of top=2, right=20, bottom=5, and left=30, you would put the following in the menuStyle definition:
Code:
padding="2 20 5 30";

Note that the order is top, right, bottom, left. You could also specify a unit of measure, like so:
Code:
padding="2px 20px 5px 30px";

If you do not use a unit of measure, it will default to px. Also note that you surround the sequence of assigned value with quotes (double or single will do) when using this approach in a menu style property.

If you want to apply the padding on an item-by-item basis (e.g., if not all items in a menu will have the same padding), you would specify padding in the aI() string. For example, your "Home" item might look like this:
Code:
aI("status=Back To Home Page;text=Home;padding=5 50 5 50;url=http://webdata.soc.hawaii.edu/css2/anth/index.html;");

which would give 5px top and bottom, and 50px left and right. Notice that you do not use quotes when assigning padding as an item style property.

Give it a shot and let us know how it goes.

Kevin


Poster: risingsun
Dated: Thursday March 17 2005 - 17:02:21 GMT

Thanks Kevin,

It worked. I forgot to add the quote marks.

RS