I know enough to be dangerous and I belive that s what has happened in this case. I have created a simple page in Dreamweaver CS5.5 and have inserted a Spry horizontal menu into a div on the page. I have begun styling the menu and submenus and have evenrything dilaed in with one exception, the submenu's "float" with about a 1px white line between the menu and submenu. I am unable to figure out how to remive this issue so that the submenu's marry to the menu. Thanks. I look forward to your replies.
Which Spry Menu are you using?
Spry 1.6 was released in 2006 and pre-dates our current list of browsers & web devices.
Spry Menu 2.0 from the Widget Exchange is the last version available. Adobe has stopped further development with the Spry Framework.
http://blogs.adobe.com/dreamweaver/2012/08/update-on-adobe-spry-framew ork-availability.html
Although you can continue using Spry if you want to, most of us have switched to something better.
Nancy O.
Nancy,
I am using whatever came pre loaded with DW CS 5.5. I will look to see about moving to the n version and completely starting over now. Really, no one knows why my submenus are floating or even wants to attempt to help? What have you moved on to that is better? jQuery? I don't have time to learn it, not interested in spending more money for additional software and definitely not interested in paying someone to do what I have been doing for the last 8 years which is building And maintaining my own site. Can anyone help?
My advice under your circumstance is that you stay with the version of Spry that you are using.
When changing the CSS it is very important to stick to a number of rules. Have a look here http://www.dwcourse.com/dreamweaver/ten-commandments-spry-menubars.php #one
If you still have a problem, please show your CSS file and relevant HTML
AG,
Thank you for your response. I reviewed the commandments and do not beleve that I have broken any of them. You will see that I added a few items for the submenu styling as I wanted to customize the width of the submenus from one mnu bar item to the other for asthetic/style reasons I have attached the Spry code and html that corresponds to the menubar. I read another thread that suggested it could be because the div i have the Spry embedded in has "relative" positioning defined. However if that is the case I have no idea how to keep the menubar where I want it which is positioned between 2 other divs.
Spry CSS:
/********************************************************************* **********
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
{
padding: 0;
list-style-type: none;
font-size: 18px;
cursor: default;
width: 41em;
font-family: "Myriad Pro", Arial, Helvetica;
text-align: center;
margin: 0 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.MenuBarHorizontal
ul li{
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: center;
cursor: pointer;
width: auto white-space
: nowrap;
float: left;
width: auto;
white-space: nowrap;
}
/* 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: 14px;
z-index:1020;
cursor: default;
width: 19em;
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
{
float: none;
width: 19em;
}
/* 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 a.MenuBarItemHover ,ul.MenuBarHorizontal
a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible{
left: auto;
top: 0;
}
/********************************************************************* **********
DESIGN INFORMATION: describes color scheme, borders, fonts
********************************************************************* **********/
/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
{
border: 0px;
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
padding: 0.5em 0.75em;
color: #FFF;
text-decoration: none;
text-align: center;
}
/* 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:;
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:;
color: #45a200;
}
/********************************************************************* **********
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 ul a.MenuBarItemSubmenu3
{
background-image:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* 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:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
width: 18em;
}
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu1
{
background-image:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
width: 7em;
}
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu2
{
background-image:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
width: 5em
}
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu3
{
background-image:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
width: 11em
}
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu4
{
background-image:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
width: 12em
}
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu5
{
background-image:;
background-color: #0526ea;
background-repeat: no-repeat;
background-position: 95% 50%;
width: 9em
}
/* 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-repeat: no-repeat;
/* [disabled]background-position: 95% 50%; */
color: #FFF;
background-color:;
}
/* 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:;
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: relative;
z-index: 1010;
filter:alpha(opacity:0.1);
}
/* 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;
}
}
HTML:
#titlebar {
background-image: url(../Images/title-bar.png);
height: 120px;
width: 1000px;
margin-right: auto;
margin-left: auto;
position: relative;
}
body {
background-image: url();
background-color: #FFFFFF;
}
#menubar {
font-size: 14px;
text-align: left;
height: 40px;
width: 1000px;
margin-right: auto;
margin-left: auto;
position: relative;
background-color: #0526ea;
}
#container {
font-family: "Myriad Pro", Arial, Helvetica;
font-size: small;
height: 600px;
width: 1000px;
margin-right: auto;
margin-left: auto;
position: relative;
background-image: none;
background-color: #FFF;
}
#footer {
font-family: "Myriad Pro", Arial, Helvetica;
font-size: x-small;
background-image: none;
height: 10px;
width: 1000px;
margin-right: auto;
margin-left: auto;
position: relative;
text-align: center;
color: #0627ef;
}
#bottomnav {
font-family: "Myriad Pro", Arial, Helvetica;
text-align: center;
height: 15px;
width: 1000px;
margin-right: auto;
margin-left: auto;
position: relative;
font-size: small;
color: #0627ef;
}
</style>
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
a:link {
color: #0627ef;
}
</style>
</head>
<body>
<div id="titlebar"></div>
<div id="menubar">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="#">Home</a>
<ul>
<li><a class="MenuBarItemSubmenu1" href="#">About Melissa</a></li>
<li><a class="MenuBarItemSubmenu1" href="#">Contact Melissa</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#" >Workshops</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="#">Basic Workshop - The Way of the Shaman</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Shamanic Extraction Healing Training</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Shamanism, Dying, and Beyond</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Shamanic Divination Training</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Shamanism and the Spirits of Nature</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Shamanic Dreamwork</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Shamanic Training in Creativity</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#">Books</a>
<ul>
<li><a class="MenuBarItemSubmenu2" href="#">Books</a></li>
<li><a class="MenuBarItemSubmenu2" href="#">CE Courses</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Shamanic Healing</a>
<ul>
<li><a class="MenuBarItemSubmenu3" href="#">Divination</a></li>
<li><a class="MenuBarItemSubmenu3" href="#">Extraction</a></li>
<li><a class="MenuBarItemSubmenu3" href="#">Power Animal Retrieval</a></li>
<li><a class="MenuBarItemSubmenu3" href="#">Psycopomp</a></li>
<li><a class="MenuBarItemSubmenu3" href="#">Soul Retrieval</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Melissa Recommends</a>
<ul>
<li><a class="MenuBarItemSubmenu4" href="#">Articles</a></li>
<li><a class="MenuBarItemSubmenu4" href="#">Books</a></li>
<li><a class="MenuBarItemSubmenu4" href="#">Videos</a></li>
<li><a class="MenuBarItemSubmenu4" href="#">Websites</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Testimonials</a>
<ul>
<li><a class="MenuBarItemSubmenu5" href="#">For Books</a></li>
<li><a class="MenuBarItemSubmenu5" href="#">For Shamanic Healing</a></li>
<li><a class="MenuBarItemSubmenu5" href="#">For Workshops</a></li>
</ul>
</li>
</ul>
</div>
Sorry, there are too many changes in the CSS for me to work through.
I suggest that you revert back to the original CSS and add/modify the following rules
ul.MenuBarHorizontal li {
width: auto;
}
ul.MenuBarHorizontal ul {
width: auto;
}
ul.MenuBarHorizontal ul li {
display: block;
float: none !important;
width: auto;
white-space: nowrap;
border-bottom: solid 1px #EEE;
}
ul.MenuBarHorizontal a.MenuBarItemSubmenu {
padding: 0.5em 2em 0.5em 0.75em;
}
ul.MenuBarHorizontal li.MenuBarItemIE {
background: transparent;
}
You may adjust some of the values to suit.
AG,
I appreciate your help. I played around some with a dummy site and basically there was some kind of conflict with the #container div (set to relative positioning) I had positioned directly after(below) the #menubar div I have the Spry menubar contained within. The background color of the div is white and for some reason it is bleeding through as a 1px space between the menu and submenu which makes the submenu appear to be "floating" separate from the main menu bar. For now I fixed with with a total hack, I added a 1px div between the #menubar div and the #container div and colored the background the same as I have the menu and submenus. Any idea why the bleed is happening?
North America
Europe, Middle East and Africa
Asia Pacific