Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us
Online Education
Imprinted Gifts
Best Price
KVM Switch over IP
KVM Switches
Free Business Cards
PDA Phones & Cases
Boat Donations
Memory
Logo Design
Car Donations
Dental Insurance
GPS
Desktop Computers

          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / samples / background images

Background Images

Menu Placer #1

Both menus and items can now include background images. The above permanently displayed menu utilizes a gray gradient background image. Since child menus can be styled independently of their parents, the child menus needn't inherit the same background image that the permanent menu does.

In addition to specifying the image itself, you can also specify the CSS properties of the background image; such as positioning (top, right, etc.) and repeating.

Menu Placer #2 Admittedly, tiled images work best for menus, since they can be repeated regardless of how tall or wide the menu items make your menus. But if you're careful, fixed images can also be used to produce interesting effects, such as the curved edges of the permanently displayed menu to the left of this paragraph.

Be careful with item background images in Internet Explorer 4, which we've found can produce inconsistent results. The menu to the left for example, would not render properly in Internet Explorer 4; requiring us to force the image to not show in that browser; i.e.:

ItemBackgroundImage:(HM_IE4)?null:"curve1.gif",

Finally, though not a native capability of HierMenus, note that it is also possible to setup menu items such that background images are swapped when the menu item is highlighted (rolled over, forced to be permanently highlighted via IsPermHilite, or forced to be permanently selected via IsSelected). To accomplish this, you must utilize HM's ability to style menu items via class name assignments, and then assign the appropriate background images to the style sheet definitions for the class names that you will assign to the menu items.

Consider the menu below, which is similar to the menu at the top of the page:

Menu Placer #3

In this menu, we've set the menu items to initially display a background image (again, we've elected to not support IE4 with this technique) via their default class name assignments (ItemClass), but assigned a different background image to the over and selected class names for the menu items (ItemClassOver, and ItemClassSelected). This results in the swapping of the background images as the item class names themselves are swapped for the menu items. Here are the style sheet rules we assigned to the menu item class names:

.hm_item     {color:black; background:#efefef url('bg_blue.gif')}
.hm_itemOver {color:black; background:#efefef url('bg_yellow.gif')}

See the Using Classes Mini-Tutorial for specific information pertaining to the use of style sheet classes with HierMenus; and for further information on the standard use of background images in HM, check out the reference entries for these configuration parameters:

ItemBackgroundImage
ItemBackgroundProperties
MenuBackgroundImage
MenuBackgroundProperties

Click the link below to have a look at the configuration file we used to generate these sample menus:

bgimages.js



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
Created: 3/25/2004
Updated: 5/18/2004
URL: http://www.hiermenuscentral.com/samples/bgimages.html