Setting the width of the pagebgimage

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Posts: 1
Joined: Wed Oct 03, 2012 7:47 pm

Setting the width of the pagebgimage

Postby bt99 » Wed Oct 03, 2012 8:01 pm

Is it possible to set the width of the pagebgimage so it is 50PX wide rather than 100% of the width of the nav item? I'll also need to center the pagebgimage. Thanks in advance for your help. You have a great product.

User avatar
Posts: 8760
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA

Re: Setting the width of the pagebgimage

Postby Ruth » Wed Oct 03, 2012 10:13 pm


Yes, you can do that, but not through a 'menu' code. You need to use the menu property pageclass. The pageclass parameter is used to specify a classname for the Current Page Menu Item for CSS. This parameter can be either a style section or an item section menu code. You would set up a css class for what you want as to the current page colors, text, bgimage etc. Then you would use the pageclass="classname"; either in the style section which means it would apply to all menus that used that style, or if you wanted to create a distinct pageclass for one item, you would set up the css class and then call it in the item string, i.e.

Code: Select all

aI("pageclass=classname;text=Home Page;url=index.htm;");

Creating a css class for pageclass allows you to do all css coding for bgimage, like position, repeat or no repeat and so on. Remember that bgimages repeat automatically, so to set it as you want it you would need to set up all you want in your css. For example, setting a bgimage on divs you might do the css like this

Code: Select all

background-size:80px 60px;

The css background parameters are: background, background-attachment, background-color, background-image, background-position, background-repeat, background-clip, background-origin, background-size. Not sure what background-origin is.

Hope this helps. If you want more information on the css parameters for thing like position etc, try this and click on background in the middle column towards the top. Also, please note that the background-size is a CSS3 property so in browsers that don't yet support that it will not be sized. Not sure, but I w ould think that you could actually create your background a particular size, then it would be the size you want [I think :) ].


Return to “Help & Support for DHTML Menu Version 5+”

Who is online

Users browsing this forum: No registered users and 2 guests