Spry Menu Background
I've seen this question posted around various places but
haven't seen a direct answer to it; or maybe I've overlooked it.
How can I make the background for the pop out menus
semi-transparent? (For IE7, Safari, & Firefox2)
Thanks in advance!
You need to set up a special class and apply it to the LI for
the sub
menus...
if you look at this page I put up yesterday, you can see that
I have a
different color for the subs (not opaque, but you do that by
adding the
opacity styles to the class)
http://www.perrelink.com.au/beauty/
Check out the stylesheet and look for the #MenuBar1 .flyout a
and check the html code to see where I applied the class.
Nadia
Adobe® Community Expert : Dreamweaver
CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
~ Customisation Service Available ~
http://www.csstemplates.com.au
Spry Widget Examples
http://www.dreamweaverresources.com/spry-widgets/
"jedweb" <[email protected]> wrote in
message
news:f60keo$r2d$[email protected]..
> I've seen this question posted around various places but
haven't seen a
> direct
> answer to it; or maybe I've overlooked it.
>
> How can I make the background for the pop out menus
semi-transparent?
> (For
> IE7, Safari, & Firefox2)
>
> Thanks in advance!
>
Similar Messages
-
Spry Menu background is white in IE
I've created a vertical Spry menu with submenus. The menu should not have a background color, so it should take the color of the image it's on top of. This looks fine on Safari (Mac) and Firefox (Mac/Windows), but on IE 8 (Windows), the menu background is WHITE. This makes it difficult to see the menu items. What can I do so that the menu background is transparent and does not show up white in IE?
The site: http://chrysacupuncture.com
I'm attaching index.html, my own css file, and the Spry css file.
Thanks for your help.Actually, now that I look at it, I think one of your IE hacks might be malfunctioning:
/* 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.MenuBarVertical li.MenuBarItemIE
display: inline;
f\loat: left;
background: #FFF;
This is the bottom-most item in your CSS file. Notice the typo in the float:left and that it does indeed state a white background background:#FFF. I don't usually put IE hacks external CSS, you might try moving it to the main HTML file and using IECC. Place it in the header as you would if you had internal CSS:
<!--[if IE 5]>
<style type="text/css">
ul.MenuBarVertical li.MenuBarItemIE
display: inline;
float: left;
</style>
<![endIf]-->
I removed the background color altogether, but you may have to define one (I don't usually support IE5 so I'm not sure).
If you insist on having this hack externally, you can try placing the background: transparent in the first item of your CSS:
ul.MenuBarVertical
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
cursor: default;
width: 9em;
padding-top: 80px;
background: transparent; -
SPRY menu background transparency
Is it possible for the spry menu object to use a transparent
background? I'm assuming the white background that shows up when
you remove all of the menu's background colors is an iFrame meant
to keep the menu from slipping behind form elements...is there any
way to disable this behavior? Thanks in advance.Hi,
please try to add on this rule:
ul.MenuBarHorizontal li the following property: opacity:0.3;
(this will work only for FF, for IE you should have:
filter:alpha(opacity:30))
We have a fix for the next spry release version, about
iframes: on this rule ul.MenuBarHorizontal iframe add:
filter:alpha(opacity:0.1);
Hope this helps,
Diana -
So I decided to spice up my page a little by adding a
background image to my spry menu buttons.
After creating an image I went to "ul.MenuBarVertical a" and
set my new image as the background, worked fine.
Same image with a triangle on right for a submenu button in
"ul.MenuBarVertical a.MenuBarItemSubmenu" worked fine.
Hover image in "ul.MenuBarVertical a:hover,
ul.MenuBarVertical a:focus" works fine.
But I can't seem to change the background image for hovering
over a submenu button. I assumed it would go in "ul.MenuBarVertical
a.MenuBarItemSubmenuHover" but when I hover over it the image just
isn't right. I've looked at all the rules for my spry menu and have
no idea what is wrong, help please, thanks in advance.It is always best to read the comments within the CSS.
For instance, the first lot of style rules come under the heading
LAYOUT INFORMATION: describes box model, positioning, z-order
Then there are style rules that come under the heading of
DESIGN INFORMATION: describes color scheme, borders, fonts
Other headings are
SUBMENU INDICATION: styles if there is a submenu under a given menu item
and
BROWSER HACKS: the hacks below should not be changed unless you are an expert
As for highlighting there are the following
/* 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: #33C;
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: #33C;
color: #FFF;
Gramps -
Making spry menu background transparent
Hello
I have made a spry menu and made the background transparent.
Works in Safari and Firefox on my mac but on a pc (IE) it is white.
How can I change this? (I'm fairly new at this) ThanksHello DrJeff08
I'm happy to report that I did manage to solve my problem,
perhaps if we're lucky we'll solve yours too. (This is my first
website with Dreamweaver and first time using CSS). I went to my
CSS panel in order to view all the rules I'd created, opened up the
Spry CSS rules and methodically checked all of the properties for
each of the rules. The very last entry on that style sheet was one
that I didn't create, called ul.menuBarVertical li.MenuBarItemIE
(the "IE" that I see at the end of that name gave me a clue that it
relates to Internet Explorer) I noticed that the background was
white so I simply removed the white background. It must have been
automatically inserted as a default background color.
Hope it helps! -
Spry Menu Background image not working in IE
I have created a website using Dreamweaver CS5 and having trouble with my Spry bar in internet explorer. It looks great in chrome, firefox, etc, but in IE there is a white background instead of my background image and the submenus have moved WAY right.. can someone help me!
SpryMenuBarHorizontal.CSS is below:
@charset "UTF-8";
/* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
/* 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: 800px;
/* 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: center;
cursor: pointer;
width: 160px;
float: left;
background-image: url(file:///E|/MAIN_website/images/menu_background.jpg);
ul.MenuBarHorizontal li a{
color:#FFF;
ul.MenuBarHorizontal li li{
background-image: url(../images/menu_background1.jpg);
ul.MenuBarHorizontal li li a{
color:#000;
ul.MenuBarHorizontal li li li{
background-image: url(file:///E|/MAIN_website/images/index_06.jpg);
ul.MenuBarHorizontal li li li a{
color:#FFF;
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover,
ul.MenuBarHorizontal a.MenuBarSubmenuVisible{
color:#33CCFF;
/* 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: 8.2em;
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: 160px;
/* 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 solid #CCC;
/* 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;
font-family: Cambria, Arial, sans-serif;
font-size: 14px;
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
color: #FFF;
text-decoration: underline;
/* [disabled]background-image: url(file:///E|/MAIN_website/images/menu_background.jpg); */
/* 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: #33C;
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(SpryMenuBarDown.gif);
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: url(SpryMenuBarRight.gif);
background-repeat: no-repeat;
background-position: 95% 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 a.MenuBarItemSubmenuHover
background-image: url(SpryMenuBarDownHover.gif);
background-repeat: no-repeat;
background-position: 95% 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;
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;Because I can't see your site and code in context, I will make a guess that this style is throwing off your alignment:
/* 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: 160px;
float: left;
background-image: url(file:///E|/MAIN_website/images/menu_background.jpg);
Remove the text-align:center; from the above style.
Instead of centering your list element (li), center the link text (a) itself:
/* 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-align: center;
text-decoration: none;
font-family: Cambria, Arial, sans-serif;
font-size: 14px;
If you don't want the submenu text to be centered, do this immediately after the previous style:
ul.MenuBarHorizontal ul a {text-align: left;}
The sub-submenus are also set up by default to be jogged a bit to the right. You can adjust this style:
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
position: absolute;
margin: -5% 0 0 95%;
that causes sub-submenus to fly out to the right of the submenus to which they attach.
Submenus themselves (not the sub-submenus) should fall directly under the top menu item by default, once you remove the text-align: center; on the li item (above).
Beth -
The background color of one of my menu items (the only one which includes a submenu) appears as white instead of blue in Internet Explorer 8.0
Any tips on how to correc this? I'm using Spry 1.6 - maybe I should download the Spry 2.0 Widget? If I do that, do I have to recreate the entire menu?
http://www.studio2adv.com/dev/gibson
Thanks in advance for any advice.Sorry, didm't have time to test this but try changing the css background: #FFF;
/* 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; -
Spry Menu Background Stops After Text
I made a Spry Vertical Menu in DCS4. When I look at it in the browser, the background only extends the length of text...I want it to extend across the box equally for all the menu choices. I have looked at all the CSS properties and changed the values, but nothing seems to affect the length of the backgrounds. Can you offer any suggestions? You can see the page at http://www.stepbystepcare.org/index4.html
1. Resurrect the original SpryMenuBarHorizontal.css, too many irregularities in the modified one.
2. remove line 18-20 from the main document
3. add a closing UL-tag to line 83 main document
4. Then add the following to the bottom of the original SpryMenuBarHorizontal.css
ul.MenuBarHorizontal {
width: 940px;
margin: auto;
font-family: 'Oswald', sans-serif;
font-size: 14px;
letter-spacing: 1px;
ul.MenuBarHorizontal li {
width: auto;
ul.MenuBarHorizontal ul {
width: auto;
ul.MenuBarHorizontal ul li {
display: block;
float: none !important;
width: auto;
white-space: nowrap;
ul.MenuBarHorizontal a {
color: #B5B5B5;
text-transform: uppercase;
padding: 1.1em 3em 1.1em 1.5em;
background: url(../images/img03.gif) repeat-x -100px;
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus, ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible {
background-color: transparent;
color: #FFF;
ul.MenuBarHorizontal li.MenuBarItemIE {
background: url(../images/img03.gif) repeat-x -100px; -
I've created a spry vertical menu with a black background.
When I mouse over one of the menu items and the sub menu appears, I
would like it to have a different color background than the main
menu. Anyone know how to accomplish this?
Thank you>Sorry, didm't have time to test this but try changing the css background: #FFF;
/* 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; -
Background png doesn't show right in vertical spry menu in IE
Hi,
My vertical spry menu background gradient png is fine in Firefox, Safari, Chrome, etc. But in IE it shows white. I have it posted on a temporary site: http://bethniebuhr.com
Can you help me fix the IE?
Thanks.At the bottom the SpryMenuBarVertical.css you have
/* 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.MenuBarVertical li.MenuBarItemIE
display: inline;
f\loat: left;
background: #FFF;
Either set the value to transparent or remove the line altogether.
Gramps -
How can I add more than one same spry menu (eg. collapsible menu) with in different styles (font size, color, background, etc) on current page?
Hi Nancy,
This screenshot was only for imagination. A part of the code (not all) is below. In the code there are some background images but they are not seem in live mode.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/my_site.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css"/>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<style>
#CollapsiblePanel1 .CollapsiblePanelOpen .CollapsiblePanelTab {
background-color: #003366;
font-size: 18px;
line-height: 52px;
color: #FFF;
#CollapsiblePanel1 .CollapsiblePanelTabHover .CollapsiblePanelTab {
background-color: #003366;
color: #FFF;
text-shadow: 1px 1px #000;
font-weight: bold;
line-height: 52px;
#CollapsiblePanel1 .CollapsiblePanelClosed .CollapsiblePanelTab {
background-color: #C3CFDF;
border-radius: 5px 5px 0px 0px;
color: #999
text-shadow: 1px 1px #000;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
line-height: 52px;
#CollapsiblePanel2 .CollapsiblePanelOpen .CollapsiblePanelTab {
background-image: url(images/international.jpg);
background-repeat: no-repeat;
font-size: 18px;
line-height: 52px;
color: #FFF;
#CollapsiblePanel2 .CollapsiblePanelTabHover .CollapsiblePanelTab {
background-color: #003366;
color: #FFF;
text-shadow: 1px 1px #000;
font-weight: bold;
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel2 .CollapsiblePanelClosed .CollapsiblePanelTab {
background-color: #C3CFDF;
border-radius: 5px 5px 0px 0px;
color: #999
text-shadow: 1px 1px #000;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
background-image: url(images/TR_Gray2-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel2 .CollapsiblePanelContent {
background-color: blue;
#CollapsiblePanel3 .CollapsiblePanelOpen .CollapsiblePanelTab {
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
font-size: 18px;
line-height: 52px;
color: #FFF;
#CollapsiblePanel3 .CollapsiblePanelTabHover .CollapsiblePanelTab {
background-color: #003366;
color: #FFF;
text-shadow: 1px 1px #000;
font-weight: bold;
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel3 .CollapsiblePanelClosed .CollapsiblePanelTab {
background-color: #C3CFDF;
border-radius: 5px 5px 0px 0px;
color: #999
text-shadow: 1px 1px #000;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
background-image: url(images/TR_Gray2-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel4 .CollapsiblePanelOpen .CollapsiblePanelTab {
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
font-size: 18px;
line-height: 52px;
color: #FFF;
#CollapsiblePanel4 .CollapsiblePanelTabHover .CollapsiblePanelTab {
background-color: #003366;
color: #FFF;
text-shadow: 1px 1px #000;
font-weight: bold;
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel4 .CollapsiblePanelClosed .CollapsiblePanelTab {
background-color: #C3CFDF;
border-radius: 5px 5px 0px 0px;
color: #999
text-shadow: 1px 1px #000;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
background-image: url(images/TR_Gray2-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel5 .CollapsiblePanelOpen .CollapsiblePanelTab {
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
font-size: 18px;
line-height: 52px;
color: #FFF;
#CollapsiblePanel5 .CollapsiblePanelTabHover .CollapsiblePanelTab {
background-color: #003366;
color: #FFF;
text-shadow: 1px 1px #000;
font-weight: bold;
background-image: url(images/TR_Col-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
#CollapsiblePanel5 .CollapsiblePanelClosed .CollapsiblePanelTab {
background-color: #C3CFDF;
border-radius: 5px 5px 0px 0px;
color: #999
text-shadow: 1px 1px #000;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
background-image: url(images/TR_Gray2-WEB.png);
background-repeat: no-repeat;
line-height: 52px;
</style> -
Spry Menu Bar using CSS background image without losing submenu ( V) indicators
Spry menu bar sets the down and side submenu indicators using
a positioned background image. I have a requirement to use a
specific background image yet must retain the > and v submenu
indicators. Without having to generate full width custom background
images for each of the menu item types to include the side and down
menu indicators, is there anyway to use a generic background image
and show the indicators using just CSS?Don't use reserved words in JS
var event = new Spry.Data.XMLDataSet("events.xml", "catalog/event", {sortOnLoad: "date", sortOrderOnLoad: "descending"});
event is such a reserved word. If you change this to event1 then all is well.
I hope this helps.
Ben -
Spry Menu Bar - Different Background Image Wanted for menu items
Hi, I've looked everywhere for help with this and just haven't found any answers yet ...
I want my Dreamweaver CS5.5 menu to look like this design I've done in PhotoShop ...
It's a simple one level list with no sub-levels.
Everything is good, except I can only set one background image for all the menu items at this level.
I want the first, last, and all the middle, menu items to use different background images.
I have no idea where or how to insert the code to set a different background image for each individual menu item ...
I know I could use images set one on top another in a column with rollover image swop, but the spry menu opens the door for dynamic content so I'm keen to get it working.
Manchester city council has a great example of this style of menu design working at - http://www.manchester.gov.uk/
They've got funky indenting of the text as well.
~~~~~~
This is the code for my menu list ...
<div class="sidebar1">
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="#">Home</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Groups</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Help</a></li>
</ul>
</div>
This is how I set the background image (but I can only define one image) ...
I set the image background to "Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg" through ...
CSS Styles
SpryMenuBarVertical.css
ul.MenuBarVertical a
I then select the background category
and browse to the image file.
doing this changes my CSS code as follows ...
ul.MenuBarVertical li
padding: 0;
list-style-type: none;
font-size: 100%;
position: relative;
text-align: left;
cursor: pointer;
width: 170px;
margin-top: 4px;
margin-bottom: 4px;
background: url(/Images/Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg);
ul.MenuBarVertical ul
padding: 0;
list-style-type: none;
font-size: 100%;
position: absolute;
z-index: 1020;
cursor: default;
width: 170px;
left: -1000em;
top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 95%;
background: url(/Images/Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg);
ul.MenuBarVertical a
display: block;
cursor: pointer;
padding: 0.5em 0.75em;
color: #0000;
text-decoration: none;
font: normal 12px Verdana, Geneva, sans-serif;
background: #EEE url(/Images/Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg);
~~~~~~
These are the three images I want to apply to the top middle and bottom menu items :
Top menu item background image - "Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg"
Middle menu items background image - "Menu-Nav-Bar-Pic-Mid-v1-w170px-h32px.jpg"
Bottom menu item background image - "Menu-Nav-Bar-Pic-Bot-v1-w170px-h32px.jpg"
~~~~~~
As I am unable to set the menu items individually, this is how the menu looks like on my website at the moment ...
~~~~~~
So near yet so far ! I'm hapy with the verdana font, the image size and spacing, but the background images I just can't set them right.
I'd really appreciate any help on this as I'm out of ideas.
Thank you.The easiest way is to use pseudo elements.
To style the first and last menu items ifferently to the rest, merely add :first-child and :last-child respectivly as follows
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">
<style>
ul.MenuBarVertical li:first-child a {
background-color: red;
color: white;
ul.MenuBarVertical li:last-child a {
background-color: green;
color: yellow;
</style>
</head>
<body>
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
<li><a href="#">Item 4</a></li>
<li><a href="#">Item 5</a></li>
</ul>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
In your case, in liue of the background colour, you would have an image.
Gramps -
Using a background image for the buttons in spry menu
Hi All,
Going nuts here.
I'm using the vertical spry menu widget w DW CS3 and trying
to alter the css style sheet, so that I can use a li class for each
of the 14 links on this page, with an upstate and a hover state
only. (the focus, and hover while down will be the same as the
others, to keep it simple and not too distracting)
The page is here that I will be replacing the entire
background image in sidebar1 and sidebar2 with a custom spry menu
with the 14 li classes for 2 seperate menus:
http://audibleimagesav.com/blank_doc.html
Has anyone used a background image in place of just using
bkgrd colors and borders for the spry menu ?
I am aware of the attributes that the help docs suggest that
need to be altered as listed here :
http://livedocs.adobe.com/en_US/Spry/1.4/help.html?content=WS0BB04E11-1BE3-4a67-BC94-BE7DA 93A0159.html
I have been working on just an experimental page, that is now
hacked up, however if you want to see that it is here with only the
first list item coded:
http://audibleimagesav.com/site%20theme%20ideas/sprymenu_exp.html
The spry css menu widget for that page is here:
http://audibleimagesav.com/SpryAssets/SpryMenuBarVertical.css
So in short, has anyone done a bkgrd image for the main menu
(not submenu) in a spry widget?
Thanks in advance.
Art
Art Hansen
Web Design & Marketing
http://www.innova-techsolutions.com
321.750.3852 - Cocoa Beach, Florida, USAhttp://meyerweb.com/eric/css/edge/popups/demo2.html
Maybe -
How can you create a spry menu bar with no background colour?
How can you create the first level of a spry menu bar to have no colour? I have a coloured background right now and the colour matches when you load the site in Internet explorer but does not match in Firefox. Any suggestions are welcomed on how to fix this.
Thanks!
HKHere is the site:
http://partnersnaturally.ca/
I am learning with code, (obviously) so any feedback would be nice. I use dreamweaver CS4, but when I originally designed the site it was in a much older version of dreamweaver. I wonder if that could also be a cause. (besides human error)
Thanks again,
HK
Maybe you are looking for
-
Word is crashing when I try to open...
I've tried restarting the computer, as well as accessing Word from an established document. (This worked until I tried to open a new document or make changes.) Any ideas?
-
How do I move my Itunes library from my old pc to my new laptop?
Hi, I have most of my music on my cronky old PC which is about to die! How do I transfer the music on my itunes onto my shiny new laptop? Please can you make it really easy??? Thanks Helen
-
Keynoard Crazy in Mac OS X 10.9.4
Hello. I just installed the OS X 10.9.4 thirty minutes ago and when the computer restated, a notification appeared, and it said that the calendar plugin was not installed (something like that, I don't remember the exact text). The computer was stuck
-
Payment Advice using Correspondence
Hi friends, I need to generate the Payment Advice for Vendor Payments. The issue is that I am making the payments through F-53 and the payment method is Bank Transfer. Is there any way of generating the Payment Advices in this case? Has anyone genera
-
J2ee application in exploded format in oracle 10g
sorry: folder structure is like this: test_app --META-INF -----application.xml --test_web -----pages -------welcome.jsp -----WEB-INF -------web.xml -------lib -------src Regards, Roopa. Message was edited by: user447401