CSS Properties

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
joejoeE
Beginner
Beginner
Posts: 7
Joined: Fri Dec 17, 2004 4:22 pm

CSS Properties

Post by joejoeE »

I'm trying to use CSS properties instead of the javascript styles and I'm having some troubles. On the main site, it says..
Please note that not all properties can be declared but the vast majority should be fine.
Certainly, someone knows more about using CSS with milonic and could share their knowledge. Is there anything more accurate than this that would list what properties do what within the menus? I'm partly being lazy but I don't want to try every single CSS property to figure what works.

Kind regards.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I can give you some:

border properties, margin, padding, background-color, font properties, text-align; width [it seems to apply to the item] in the horizontal the menu would be the width + padding + margin x number of items, in the vertical the menu would be the width listed plus padding right and left. Height functions the same way, it's itemheight, which in horizontal would be the menu height unless you actually specify one and in vertical the menu height would be the height + padding + margin x number of items.

That's all I remember right now. You need to create an off and an on class if you want to keep the sense of mouseOver changes. Hope that helps some.

example:

Code: Select all

.mainOff {
		background-color:#fafcff;
		color:#468C8C; 
		border-top: 1px #CC99CC inset; border-right:3px #CC3399 inset;border-bottom:3px #CC3399 inset; border-left:1px #CC99CC inset; 
		font-size: 11px;
		font-style: normal;
		font-weight: normal;
		font-family: arial,helvetica,"times new roman";
		text-align: left;
		width:110px;
		height:50px;
		text-decoration: underline overline;
		padding:5px;
		margin: 2px;
		}
.mainOn {
		background-color:#468C8C;
		color:#fafcff; 
		border-top: 1px #CCFF66 outset; border-right:3px #339900 outset;border-bottom:3px #339900 outset; border-left:1px #CCFF66 outset; 
		font-size: 11px;
		font-style: normal;
		font-weight: bold;
		font-family: arial,helvetica,"times new roman";
		text-align: right;
		width:110px;
		text-decoration: line-through;
		padding:2px;
		margin: 3px;
		}
I put mine in the head of the document, but it will work from a stylesheet. In the menu data file you'd put this in the style definition in place of whatever you have in the css style offclass="mainOff"; onclass="main-on";

background-image doesn't seem to work. Perhaps because it needs to know if it's an bgimage, which would place it in an item as background, or in a menubgimage.

Ruth
Post Reply