Menu Border

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
erik_c
Advanced
Advanced
Posts: 10
Joined: Thu Dec 08, 2005 11:06 pm

Menu Border

Post by erik_c »

Within the menu style, is it possible to define a separate height for each side of the border (top,left,right,bottom)?
For example, set up a submenu so that there is no border at the top.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, you can do that but not in the menuStyle. You would have to work it out in css and it would take a few classes which would have to be called in each item in the submenu. If you give me the menu and how you want it I could work something up so you can see how to do it.

Using as your example not having a top border in the submenu.

1. You'd have to remove the border coding from the style for that submenu, that is set it to 0 so that no menu border shows.

2. in css you'd define classes for the submenu items borders. You'd need an off class and an on class for each item. If the border is going to be the same in both the off and on class you'd only need to define one class for each item and just call that class as both the off and on class. So, for the top and middle items you'd create a class i.e.

Code: Select all

.itembord{border-top:0px solid #ffffff;border-right:1px solid #ffffff;border-bottom:0px solid #ffffff;border-left:1px solid #ffffff}
Then you create the same class for the bottom item in the submenu but you make the border-bottom:1px solid #ffffff that way it has a left, right, bottom border and no top border, you'd name it bottomItem or something.

Then in each item you'd call offclass=itembord;onclass=itembord, then in the bottom item you'd call offclass=bottomItem;onclass=bottomItem.

The reason you have to create classes for the items is that css applies the equivalent of the offborder and onborder codes not the menu border.

Hope that made sense. You might take a look at the basic css demo that is up http://support.milonic.com/beginners/css_styling/

Just keep in mind when you're talking about border, that in the menu the border code you put in applies the border to the surrounding 'box' but in css that does not happen, it applies whatever border codes you put in to each item box. The equivalent in the menu properties is the offborder and onborder codes.

Ruth
Post Reply