Solved

Changing Dreamweaver CS3 Spry Menu CSS for Submenu Formatting

Posted on 2009-04-06
2
886 Views
Last Modified: 2012-05-06
Hi, I'm having trouble getting my spry submenu to look right. Here's the link, mouseover "Attorneys" to get the submenu inquestion:

http://www.stratasandweathers.com/0newdesign.htm

I'd like the submenu to be all black, then mauve (#a36666) with mouseover. Does anyone know why it is using the background-image from the main menu? I tried "background-image:none", but that doesn't affect it. What the heck is that white box behind the menu??? How do I make the background take up the common width of the submenu, not just the size of the item name?

Thanks!!
@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
 

 *******************************************************************************/
 

.menu {

	background-image:url(../images/bgmenuOff.gif);

	background-repeat:repeat-x;

	margin:0;

	padding:0;

	text-align:center;

	width:100%;

}
 

/* 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: 100%;
 

	float:right;

	background-image:url(../images/bgmenuOff.gif);

	background-repeat:repeat-x;
 

	z-index:1;
 

}

/* 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;

	list-style-type: none;

	font-size: 14px;

	line-height:14px;

	position: relative;

	font-family:Verdana, Arial, Helvetica, sans-serif;

	width: auto;

	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: 0;

	padding: 0;

	list-style-type: none;

	font-size: 100%;

	z-index: 1020;

	cursor: default;

	width: auto;

	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: auto;

	clear:left;

}

/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */

ul.MenuBarHorizontal ul ul

{

	position: absolute;

	margin: -5% 0 0 150%;

}

/* 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 solid #CCC;

}

/* Menu items are a light gray block with padding and no text decoration */

ul.MenuBarHorizontal a

{

	display: block;

	cursor: pointer;

	background-color: #EEE;

	padding: 0.5em 0.75em;

	color: white;

	text-decoration: none;

	text-align:center;

	background-image:url(../images/bgmenuOff.gif);

	background-repeat:repeat-x;

}

/* Menu items that have mouse over or focus have white text */

ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus

{

	color: #FFF;

	background-image:url(../images/bgmenuOver.gif);

	background-repeat:repeat-x;
 

}

/* Menu items that are open with submenus are set to MenuBarItemHover  */

ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible

{

}
 

/*******************************************************************************
 

 SUBMENU INDICATION: styles if there is a submenu under a given menu item
 

 *******************************************************************************/
 

/* this is how the main menu item looks when the submenu is open */

ul.MenuBarHorizontal a.MenuBarItemSubmenu

{

}

/* 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:none;

	background-color:black;

	width:100%;

}

/* 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

{

	width:auto;

	background-color:#a36666;

}

/* 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

{

	width:auto;

	background-color:#a36666;

}
 

/*******************************************************************************
 

 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;

	}

}

Open in new window

0
Comment
Question by:anniengodis
2 Comments
 
LVL 11

Expert Comment

by:level9wizard
ID: 24082821
I noticed no one has commented and thought I'd suggest checking out Stu Nicholls menu scripts. I really like the XHTML valid ones like the Sekeleton Dropdown seen here:
http://www.stunicholls.com/menu/skeleton.html

Goodluck!
0
 

Accepted Solution

by:
anniengodis earned 0 total points
ID: 24205122
Thanks for your suggestion level9wizard. I really want to stick with Dreamweaver though. I recopied the original SpryMenuBarHorizontal.css and changed things very gradually to get what I wanted...
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jquery, dropdown 4 37
Safari SVG Image Problem 1 20
Understanding Trigger in Jquery 10 28
How do i set padding within the sidebar? 2 10
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now