Proper use of CSS styles

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
p.vladi
Beginner
Beginner
Posts: 2
Joined: Fri Sep 12, 2003 2:14 pm

Proper use of CSS styles

Post by p.vladi »

Dear Sirs,

Is it possible to use a proper style sheet with the menu elements instead of the limited functionality offered by default?

For example, if I were to specify a style for a menu element in the <STYLE> tag being

.menu-element
{
PADDING-LEFT : 4;
BORDER-LEFT : SOMECOLOR;
Text alighn : whatever I want
}

this would allow for a greater control of the menu, with text positioning, margins on left and right of the text, but not on the top or the bottom, and anything else CSS has to offer.

Please tell me, how can I implement this function in my script?

Yours sincerely,

Paul Vladi
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Each menu item has an onClass and an offClass attribute. You can tell the items to utilize whatever class you want, both on roll over and roll out. If you want it to never change, set them both to the same style class. See the menu item quick reference on the http://milonic.com site under DHTML Menu.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
p.vladi
Beginner
Beginner
Posts: 2
Joined: Fri Sep 12, 2003 2:14 pm

Post by p.vladi »

Thank you very much for your prompt reply; I have one more question, if you do not mind -
Is it possible to specify this globally, instead of for each item individually?


Hergio wrote:Each menu item has an onClass and an offClass attribute. You can tell the items to utilize whatever class you want, both on roll over and roll out. If you want it to never change, set them both to the same style class. See the menu item quick reference on the http://milonic.com site under DHTML Menu.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

p.vladi wrote:Thank you very much for your prompt reply; I have one more question, if you do not mind -
Is it possible to specify this globally, instead of for each item individually?
Yes, onClass and offClass exist in the Style Properties as well. Check the reference that Dave mentioned in a previous message for all the information.
John
Post Reply