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:10

padding-left? identation?


Poster: cpriest
Dated: Tuesday September 14 2004 - 18:31:20 BST

I've looked through the files but couldn't find an answer...

Is there any way I can indent a menu item with some property?


Poster: John
Dated: Tuesday September 14 2004 - 18:37:37 BST

Depending on how much you want, most folks just use  . Another way is with the rawcss property and a padding-left value.


Poster: kevin3442
Dated: Tuesday September 14 2004 - 20:24:20 BST

Hi,

Something that used to work, then didn't for several releases, but does again is to use css-like syntax in the menu's padding property, in the menu style or in anu individual menu item definition. Like so:

In a style:
Code:
padding="5px 5px 5px 15px";


In a menu item:
Code:
aI("text=Item Text;url=whatever.htm;padding=5px 5px 5px 15px;");


You can use other units of measure instead of px, or if you want to use px, you could omit it entirely since px is the default.

I do not know if this approach is officially supported, but I just tested it in IE6 and it does work.

FWIW,

Kevin


Poster: Ruth
Dated: Wednesday September 15 2004 - 5:05:35 BST

The following seems to work in IE5.5 win98se, Netscape 7.1, Firebird [fox].07, Opera 7.11, I do not know if it works on a Mac.

Declare a css class and then call it in the item you want to indent using the offclass and onclass parameters of the menu. For example [ I put it in the head of the document, but I would assume if you have a style sheet you can put it there]
Code:
<style type="text/css">.menuindent {text-indent:15px;}
</style>

Then in the menu, in the item you wish to have indent:
Code:
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;offclass=menuindent;onclass=menuindent;");


I used the 15px so I could actually see if it worked.

Ruth


Poster: kevin3442
Dated: Wednesday September 15 2004 - 6:47:18 BST

Ah yes... Ruth has a good idea there! Forgot about onclass and offclass. Just to add, you can also set onclass and offclass in a menu style, rather than having to set it in each aI() string. Might save a little typing.

Cheers,

Kevin