FXsinus.com HOME
The DHTML Menu - reloaded

Style Properties (4.x)

The description of the properties will soon be completed. The following style properties may be placed:

with(itemStyle=new fxstyle()){

here

}
Please note: The syntax for style properties and menu properties slightly differs from the syntax for item properties (the quotes!).

Menu items have three different states: when mouse pointer is out of the item ("mouseout"), over the item ("mouseover") or the item gets clicked ("mousedown"). Usually you have for each state a complete set of properties; for example: textdown, imagedown, bgcolordown, colordown, ... allowing you to give each item an individual style depending on the active state.

PropertyDescriptionExample
paddingleftpaddingleft=12;
paddingtoppaddingleft=2;
alignalign="right";
fontfamilyfontfamily="Arial,Verdana,Helvetica";
fontsizeWhen defining "fontsize" you can add the following units: pt or px. Other units are not supported. Units such as: "em" or "%" have quirks. If "fontsize" is not declared, property is inherited by the settings either for body or a tag. (In Netscape 4 default fontsize is 8pt.) If you are using (strict) doctype definitions, don't forget to add a unit to "fontsize".fontsize="9pt";
fontsize=9
fontsizeonWhen defining "fontsizeon" you can add the following units: pt or px. Other units are not supported. Not available in Netscape 4.fontsizeon="9pt";
fontweightValid values are normal or bold.fontweight="normal";
fontweightonValid values are normal or bold.fontweighton="bold";
fontweightdownValid values are normal or bold.fontweightdown="bold";
fontstyleValid value is italic.fontstyle="italic";
decorationYou can use here none or underline.decoration="none";
decorationonYou can use here none or underline.decorationon="underline";
decorationdownYou can use here none or underline.decoration="underline";
colorHEX values or valid HTML colornames can be used here.color="#808080";
coloronHEX values or valid HTML colornames can be used here.coloron="#000000";
colordownHEX values or valid HTML colornames can be used here.colordown="#003366";
colormatchRequires: "match". HEX values or valid HTML colornames can be used here.colormatch="#993300";
bgcolorHEX values or valid HTML colornames can be used here.bgcolor="#FFFFFF";
bgcoloronHEX values or valid HTML colornames can be used here.bgcoloron="#D2DEFF";
bgcolordownHEX values or valid HTML colornames can be used here.bgcoloron="#3366CC";
bgcolormatchRequires: "match". HEX values or valid HTML colornames can be used here.bgcolormatch="#003399";
bordercolorHEX values or valid HTML colornames can be used here.bordercolor="#000000";
bordercoloronHEX values or valid HTML colornames can be used here.bordercoloron="#3300CC";
bordercolordownHEX values or valid HTML colornames can be used here.bordercolordown="#FFFFFF";
borderlowcolorHEX values or valid HTML colornames can be used here.borderlowcolor="#808080";
borderhighcolorHEX values or valid HTML colornames can be used here.borderhightcolor="#FFFFFF";
bordercolormatchRequires: "match". HEX values or valid HTML colornames can be used here.bordercolormatch="#990033";
borderwidthborderwidth=1;
borderstyleAll valid CSS 1 and CSS 2 values can be set for "borderstyle".borderstyle="solid";
borderstyleonAll valid CSS 1 and CSS 2 values can be set for "borderstyleon".borderstyleon="outset";
borderstyledownAll valid CSS 1 and CSS 2 values can be set for "borderstyledown".borderstyledown="outset";
borderwidthmatchRequires: "match". borderwidthmatch=2;
bgimagebgimage="mybgimage.gif";
bgimageon(Not supported in IE for Mac.)bgimageon="mybgimageon.gif";
bgimagedown(Not supported in IE for Mac.)bgimagedown="mybgimagedown.gif";
arrowEnter image path. The image gets visible, if the item has a submenu. Important: Path has to be relative to the HTML-page, where the menu will be displayed and not relative to the js-file!arrow="subimg.gif";
arrowonarrowon="subimgon.gif";
arrowdownarrowdown="subimgdown.gif";
arrowrightarrowright=25;
arrowtoparrowtop=1;
iconicon="iconhome.gif";
icononiconon="iconhomeon.gif";
icondownicondown="iconhomedown.gif";
iconmatchRequires: "match". iconmatch="iconhomematch.gif";
iconwidthiconwidth=22;
iconlefticonleft=5;
icontopicontop=1;
left"Left" is used to force independet item positioning within the menu. The items are no longer positioned relative but absolute to the left corner of the menu. This feature is difficult to use and is not mandatory or explicit recommended.left=5;
top"Top" is used to force independet item positioning within the menu. The items are no longer positioned relative but absolute to the top corner of the menu. This feature is difficult to use and is not mandatory or explicit recommended.top=50;
widthSets the width of the item. This is mandatorywidth=190;
heightSets the height of the item. This is mandatoryheight=30;
imagematchRequires: "match". imagematch="guitarmatch.jpg";
urldelayDelay to show an "down" style of an item, before you are forwarded to the "url". Attention: A defined JavaScript function in "url" will be executed with a delay too. Unit is milliseconds.urldelay=1000;
target"Target" can be used to open new browser windows or to link to frames. If "target" isn't set, the url opens in the same window. If the "target" is set, but the frame is not available the url opens in a new window. For iframes use the property "iframe".target="myframe";
target="blank";
target="parent";
target="top";
iframeUse "iframe" instead of target, if you want to open a new page in an iframe. If the declared iframe is not available, the url opens in a new window.iframe="myiframe";
matchMatch with url, allows you to add specific styles to an item. "Match" is used to show visitors the currently active web page in your web project.match="url";
cursorDisplays a different cursor on "mouseover" event in all DOM-compliant browsers(MSIE 5+, NETSCAPE 6+, OPERA 7+, ...). Valid values are: default, auto, crosshair, pointer, move, text, help and wait. Internet users expect a certain behaviour when they see a cursor, therefore you should choose the "cursor" carefully. For example when they see a move cursor, visitors expect the menu to be dragable. cursor="pointer";
cursormatchRequires: "match".cursormatch="text"
typeUsually an item is overlapped by a layer to create a clickable area. With "type=form" you can remove the overlapping layer to display form elements like select boxes or textareas. "Type=header" can be used to convert the item into a static headline or to define several links to different locations in one item.type="form";
type="header";
functionoverAllows you to define any JavaScript function. Works like an interface between the FX code and your own functions. Fired on "mouseover" event, when you move your mouse over an item.functionover="myfunction()";
functionoutAllows you to define any JavaScript function. Fired on "mouseout" event.functionout="myfunction()";
functiondownAllows you to define any JavaScript function. Fired on "click" event.functiondown="myfunctiondown()";
Home | Forum | Link to us
FXsinus.com - Austria.
Vor der Bruck 15,
A-2770 Goodstone
 © Copyright 2001-2004 FXsinus.com, All Rights Reserved. webmaster@fxsinus.com