Results 1 to 3 of 3

Thread: HVmenu - filter:Alpha(opacity=80);?

  1. #1
    Join Date
    Dec 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HVmenu - filter:Alpha(opacity=80);?

    1) Script Title: HV Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem: I would like to add some additional styling to the menus via CSS. Is that possible? Specifically, I would like to make the submenus semi-transparent using filter:Alpha(opacity=80);. Any help on how to do that with CSS or JavaScript would be very much appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Their are no convenient and exclusive styling hooks generated by this script for its generated menu elements.

    The elements that you are looking for are all divisions. You can go into menu_com.js and find this:

    Code:
    	if(DomYes){
    		var MmbrCntnr=Location.document.createElement("div");
    		MmbrCntnr.style.position='absolute';
    		MmbrCntnr.style.visibility='hidden';
    		if(RcrsLvl!=1){
    		MmbrCntnr.style.opacity='0.8';
    		MmbrCntnr.style.filter='alpha(opacity="80")';
    		}
    		Location.document.body.appendChild(MmbrCntnr)}
    and add the red parts. This will take care of it for all modern browsers that support opacity.

    You could instead add a class name there to make your own hook:

    Code:
    	if(DomYes){
    		var MmbrCntnr=Location.document.createElement("div");
    		MmbrCntnr.style.position='absolute';
    		MmbrCntnr.style.visibility='hidden';
    		if(RcrsLvl!=1)
    		MmbrCntnr.className='HVsubs';
    		Location.document.body.appendChild(MmbrCntnr)}
    Then you could us css style like:

    Code:
    .HVsubs {
    filter:alpha(opacity="80");
    opacity:0.8;
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much. That is exactly what I was looking for!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •