This is a discussion on "Spry Menu Bar, Adding Submenu Border and Submenu semi-Transparent background" within the Web Page Design section. This forum, and the thread "Spry Menu Bar, Adding Submenu Border and Submenu semi-Transparent background are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Spry Menu Bar, Adding Submenu Border and Submenu semi-Transparent background
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Spry Menu Bar, Adding Submenu Border and Submenu semi-Transparent background
I would like to add a border only to submenu's and also I want to add a semi transparent background...
Any idea which css tags I need to edit for this? Thanks TJ |
|
|
|
||||
|
Re: Spry Menu Bar, Adding Submenu Border and Submenu semi-Transparent background
Are you able to provide some context?
Some HTML code and some CSS code that you are working on so that we can take a look. Cheers, Stew
__________________
WelshStew Lead Administrator tierney rides tboard - uk site | xtreme wales - extreme clothing If you think I've helped, click the "Thanks" webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
|
|
|||
|
Re: Spry Menu Bar, Adding Submenu Border and Submenu semi-Transparent background
Sorry, wondered if I would have to do this...
Here is the HTML <div class="top_menu"> <ul id="MenuBar1" class="MenuBarHorizontal"> <li><a href="#">Home</a> </li> <li><a class="MenuBarItemSubmenu" href="#">Portfolio</a> <ul> <li><a href="#" title="Residential Projects">Residential</a></li> <ul> <li><a class="" href="#" title="Project 1">Project 1</a></li> </ul> <li><a href="#" title="Conceptual Studies">Conceptual Studies</a></li> <li><a href="#" title="Industrial Projects">Industrial</a></li> <li><a href="#" title="Commercial Projects">Commercial</a></li> </ul> </li> <li><a href="#">Menu 3</a></li> <li><a href="#">Menu 4</a></li> <li><a href="#">Menu 5</a></li> </ul> </div> Now the CSS: @charset "UTF-8"; /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */ /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */ /************************************************** ***************************** LAYOUT INFORMATION: describes box model, positioning, z-order ************************************************** *****************************/ /* The outermost container of the Menu Bar, an auto width box with no margin or padding */ ul.MenuBarHorizontal { margin: 0; padding: 0; list-style-type: none; font-size: 100%; cursor: default; width: auto; } /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */ ul.MenuBarActive { z-index: 1000; } /* Menu item containers, position children relative to this container and are a fixed width */ ul.MenuBarHorizontal li { margin: 0; padding: 0; list-style-type: none; font-size: 100%; position: relative; text-align: left; cursor: pointer; top:0em; width: 6em; float: left; } /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */ ul.MenuBarHorizontal ul { margin: -23% 10% 0 85%; padding: 0; list-style-type: none; font-size: 100%; z-index: 1020; cursor: default; width: 6em; position: absolute; left: -1000em; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible { left: auto; } /* Menu item containers are same fixed width as parent */ ul.MenuBarHorizontal ul li { width: 8.2em; } /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */ ul.MenuBarHorizontal ul ul { position: absolute; margin: -5% 0 0 95%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible { left: auto; top: 0; } /************************************************** ***************************** DESIGN INFORMATION: describes color scheme, borders, fonts ************************************************** *****************************/ /* Submenu containers have borders on all sides */ ul.MenuBarHorizontal ul { border:1px; } /* Menu items are a light gray block with padding and no text decoration */ ul.MenuBarHorizontal a { font-family:Arial, Helvetica, sans-serif; display: block; cursor: pointer; background-color:transparent; padding: 0.2em 0.1em; color: #499bef; font-size:14px; text-decoration: none; } /* Menu items that have mouse over or focus have a blue background and white text */ ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus { background-color:transparent; color: #FFF; } /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */ ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible { background-color:transparent; color: #FFF; } /************************************************** ***************************** SUBMENU INDICATION: styles if there is a submenu under a given menu item ************************************************** *****************************/ /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenu { background-image: url(SpryMenuBarRight.gif); background-repeat: no-repeat; background-position: 50% 10%; } /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenu { background-image: url(SpryMenuBarRight.gif); background-repeat: no-repeat; background-position: 95% 10%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarRightHover.gif); background-repeat: no-repeat; background-position: 65% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarRightHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /************************************************** ***************************** BROWSER HACKS: the hacks below should not be changed unless you are an expert ************************************************** *****************************/ /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */ ul.MenuBarHorizontal iframe { position: absolute; z-index: 1010; } /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */ @media screen, projection { ul.MenuBarHorizontal li.MenuBarItemIE { display: inline; f\loat: left; background: #FFF; } } Thanks for the help. TJ |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Positioning Spry Menu Bar, etc. | Kurt | Web Page Design | 8 | Sep 11th, 2007 22:31 |
| The disappearing submenu... | BGarner | Web Page Design | 13 | Feb 18th, 2007 13:36 |
| flash button with submenu | tigas langaw | Flash & Multimedia Forum | 9 | Nov 25th, 2006 17:35 |
| div#navlist li.submenu - jscript-esque mouseover effect | jswebdev | Web Page Design | 0 | Dec 23rd, 2005 14:18 |
| how to create a .png semi-transparent image for background | laurablue3 | Web Page Design | 2 | Nov 20th, 2005 12:06 |