How to add different background image for submenu items???

Hi all,
I'm pretty new to web design and CSS in particular. Here's my problem...
I've got a Spry horizontal menu bar (untouched as yet), and I want to have a different background image for my submenu items than that of my menu items. From searching the internet I think that I need to apply a class to the submenu item (please correct me if I am wrong).
How would I go about doing this and how would I assign the class to just the submenu items?
Also ideally I want to have my first and last menu items to have rounded corners on one side (therefore making a rounded edge menu bar), is it possible to have a different background image for individual menu items? If so, how?
Really appreciate any help!

Thanks for the link! I've managed to sort the background issue, and it seems to be working fine!
Just one little issue left to tackle...
I want my text to be centered in my top menu items BUT aligned left in my drop down menu items. I have managed this but the text hugs the left hand side. I've tried adding a little margin to the left but that doesn't seem to affect anything???
Here's my CSS... Any ideas which class I should be targeting or why adding the margin isn't working would save my tearing the rest of my hair out! thanks! (screenshot attached).
@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;
    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;
    list-style-type: none;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: 120px;
    float: left;
    height: 24px;
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    background-repeat: repeat-x;
    background-color: #333333;
    background-image: url(../images/navbar_bg.jpg);
    border-right-width: 1px;
    border-left-width: 1px;
    border-right-style: solid;
    border-left-style: solid;
    border-right-color: #000000;
    border-left-color: #666666;
ul.MenuBarHorizontal li li
    list-style-type: none;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: auto;
    float: left;
    height: 24px;
    background-color: #333333;
    background-image: none;
    padding: 0;
    margin: 0;
    left: -1px;
ul.MenuBarHorizontal li li a
    list-style-type: none;
    position: relative;
    text-align: left;
    cursor: pointer;
    float: left;
    height: 24px;
    background-image: none;
    font-size: 12px;
    font-weight: normal;
    border: 0px 0 0;
    width: 120px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    padding: 0;
    margin: 0;
/* 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;
    list-style-type: none;
    font-size: 100%;
    z-index: 1020;
    cursor: default;
    width: 120px;
    position: absolute;
    left: -1000em;
    height: 24px;
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
/* 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;
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
    position: absolute;
    height: 24px;
    width: 120px;
    margin-top: -5%;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 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;
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal li a
    display: block;
    cursor: pointer;
    text-decoration: none;
    font-style: normal;
    text-transform: capitalize;
    text-align: center;
    white-space: normal;
    padding: 0px;
    height: 24px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #FFFFFF;
    line-height: 20px;
    margin: 0px;
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarHorizontal li a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #000000;
    background-image: url(../images/navbar_bg_hover.jpg);
    background-repeat: repeat-x;
    line-height: 22px;
ul.MenuBarHorizontal li li a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #000000;
    background-image: none;
    background-repeat: repeat-x;
    width: 120px;
    font-family: Geneva, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #FFFFFF;
/* 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-repeat: repeat-x;
    background-position: 95% 50%;
    background-color: #333333;
    background-image: url(../images/navbar_bg.jpg);
/* 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: repeat-x;
    background-position: 95% 50%;
    background-color: #000000;
    background-image: url(../images/navbar_bg_hover.jpg);
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;

Similar Messages

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • Custom display template - how to add anothe display template for refimement item?

    Custom display template - how to add anothe display template for refimement item?
    I add a new filter_default_custom.html file and want to create new refinement item display template to point to it
    keren tsur

    Not 100% if I understood the question, but if you uploaded your template to the Master Gallery and the corresponding .js file has been created, you can open the refinement config panel and specify the result type you want to map to your custom template.
    http://www.eliostruyf.com/part-1-create-first-search-refiner-control-template/
    Kind Regards
    Bjoern
    http://www.sharepointviking.com
    Twitter: Follow @bjoern_rapp

  • How to deactivate *Schedule Background Job for Work Items with Errors* SWU3

    Hello Guys,
    Can any one tell me how do I DEACTIVATE Schedule Background Job for Work Items with Errors in sap workflow SWU3.
    Currently it is green which I don't want. I want to stop this service.
    Regards
    NK

    Hello,
    You could also just stop the job in tx SM37.
    But why would you want to do this? As a test?
    regards
    Rick Bakker
    hanabi technology

  • Different background images for 1st / all other pages

    Hello
    I'm trying to set up my templates. Basically not a problem, except for the graphics-part:
    Page 1 of my letters should have a specific background image, while all following pages need a different one.
    Is this possible?
    thanks much in advance!
    david

    See Letterhead and follower sets:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=182&mforum=iworktips ntrick
    Peter

  • How to do the background image for a site

    Hi.
    First, thanks for reading this.
    I'm planning on using a gradient image as a background on a new site with black on the sides gradiating to blue in the middle which I created in Photoshop. The site is designed for 1024 (955) and up. How would I handle the background image so that no matter what the resolution above 1024, the visitor will see the gradient properly, meaning the blue will always be exactly in the center of the page and the image does not tile horizontally? (I don't want it to repeate from left to right when someone's resolution is really high)
    I have seen a couple of sites that use solid images that appear to stretch the background image depending on the resolution, but have not been able to figure out the CSS code. In my case, I can have a single image that's say 5 pixels high, whatever width I need for the maximum (reasonable) resolution, and let it repeat from top to bottom.
    Thank you.
    MFitz721

    Thanks for your reply, SnakEyez02 .
    Another concern is wide-spread compatablilty on the largest number of browsers and PDAs possible, so it sounds like using the method you suggested would not be an option. What would you say is my next best option? Should I just design it for 1024 pixels wide (or perhaps 1440) and let what happens happen?
    Thanks again.
    Fitz21

  • How to add a background image to a flash website?

    Hi there.
    I've created a flash website at 960X600 pixels.
    I have a JPG image that I want to use a BG to fill the browser page.
    I can edit the index.html file. Should it be inserted there? the name of the BG is bg.jpg
    Thanks
    Gil.

    GREAT! how do I do that?
    this is the html:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>index</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css" media="screen">
    html, body { height:100%; background-color: #ffffff;}
    body { margin:0; padding:0; overflow:hidden; }
    #flashContent { width:100%; height:100%; }
    </style>
    </head>
    <body>
    <div id="flashContent">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="index" align="middle">
    <param name="movie" value="index.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="wmode" value="transparent" />
    <param name="scale" value="noscale" />
    <param name="menu" value="true" />
    <param name="devicefont" value="false" />
    <param name="salign" value="" />
    <param name="allowScriptAccess" value="sameDomain" />
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="index.swf" width="100%" height="100%">
    <param name="movie" value="index.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="wmode" value="transparent" />
    <param name="scale" value="noscale" />
    <param name="menu" value="true" />
    <param name="devicefont" value="false" />
    <param name="salign" value="" />
    <param name="allowScriptAccess" value="sameDomain" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    </div>
    </body>
    </html>

  • How to add icons and images for my forms ?

    Hi everyone:
    My forms were upgraded from 6i to 11g. Then all customized images and icons can not display.
    Icon filename in property palette of forms and menus are the filename without path.
    Following http://docs.oracle.com/cd/B14099_19/web.1012/b14032/configure009.htm
    I set default.icons.iconpath to be a absolute path to all icons folder in Registry.dat, and make imageBase= documentbase in formsweb.cfg, doesn't work.
    What is the DocumentBase folder ? Is it $ORACLE_HOME/forms ??
    I also tried imageBase= codebase, package all images( gif files.) in a jar, store it into the forms/java directory. append icons.jar to archive parameter in formsweb.cfg. still doesn't work.
    What's the solution steps to do this please ?

    Frank,
    The preferred method of using Icons is to deploy them in a signed .jar file. The Oracle document you references is a little vague in this respect (paragraph 4.9.2.1). If you are going to use a jar file for your icons, you need to do the following:
    1) You must digitally sign the jar file (preferably with a Trusted Certificate - such as Verisign). You can use your own keystore, but you will get a Trusted Certificate warning in your application.
    2) Upload your <YOUR_ICON_FILE_NAME>.jar file to the %FORMS_HOME%/forms/java directory. If you use the default installation, the %FORMS_HOME% directory is typically "/Oracle_FRHome1".
    3) Update the default.env to include the full path to the jar file in the CLASSPATH variable.
    4) Then you need to update the following variables in the formsweb.cfg :
    4.1) archive=frmall.jar, <YOUR_ICON_FILE_NAME>.jar
    4.2) imageBase=codebase
    After making these changes I recommend restarting your WLS_FORMS instance to ensure the changes takes affect.
    Hope this helps.
    Craig...

  • How to add background image for AdvancedDataGrid in Flash Builder 4

    I want to add a background image for the whole AdvancedDataGrid and
    Application. Can anyone tell me how to do that?
    Thank you.

    you can use css to customize skin of af:document. something similar to this
    af|document
      background-image: url("../../img/Bluehills.jpg");
    body {
      background: url("/img/body_bg.gif") repeat-x #E0E0E0;
    }if you are using Jdev release 2 then you can simply do this from Skin editor check this link for more info http://download.oracle.com/docs/cd/E18941_01/tutorials/jdtut_11r2_83/jdtut_11r2_83.html
    Edited by: Zeeshan BaiG on Jul 12, 2011 10:33 AM

  • How to add background image for a JInternalFrame Container?

    JInternalFrame fr=new JInternalFrame();
    //we added to desktop,
    Container c=fr.getContentPane();
    //how can we set background image for a internal frame??
    thanks,
    waiting,

    You can let the container's border draw the background image: caution: some will find this image disturbing.
    One nice thing about this solution is that you don't have to subclass any components.

  • 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

  • How to change background image for each individual page in a template?

    I've been working for hours to try to figure out how to change the background image for each individual page in a template.  I have tried making a div in the body and adding a CSS and setting a background picture.  Unfortunately even after I made it editable all templated webpages changed.  I tried looking at different forum results which didn't really help me out. http://forums.adobe.com/message/2670005#2670005#2670005.  I've also tried embeding a CSS style on the webpage instead of the external CSS which again didn't work.  I'm not sure where to go from here.  Is there a good video that explains this clearly.  Please help.  Thanks.

    Adjust inline styles to suit your needs.
    <li><a tabindex="-1" href="giving/index.html" class="MenuBarItemSubmenu" style="background:none; color:#FFF; background: #000;">GIVING</a>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Adding A Separate Background Image For Each Menu Item

    I asked this in the Spry forum, and not sure I understand the answer. Plus, I should have been more specific in asking how to do it, as I'm still pretty new to this stuff. Nothing I'd found indicated it could be done, or how.
    Org question -
    I know you can apply a background image to the menu bar items, but is it possible to add a background image for each individual item? What I'm basically trying to keep are the effects (bevel/emboss, etc.,) that I attached to the text, when I created it in PS CS4.
    Answer -
    Yes you can. The widget is just normal plain html markup so you can just add other classNames or id attributes to the elements. And style the elements through those classes/ids.
    Does this mean I'd have to write a new rule for each menu item? What?
    Thank you.

    Did an Adobe Tutorial for creating/entering a Spry Menu Bar. This is the HTML, after I took out the submenus.
    <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="news.html">Features</a></li>
          <li><a href="news.html">News</a></li>
          <li><a href="news.html">Fashion</a></li>
          <li><a href="news.html">Lifestyle</a></li>
          <li><a href="news.html">Calendar</a></li>
        </ul>
    This is from the SpryMenuBarHorizontal.css (It seems like I need to make changes in the Design Info section of this code. But nothing I've tried has worked):
    /* 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;
    text-transform: uppercase;
    /* 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;
    width: 7em;
    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: 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: 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 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;
    color: #333;
    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: #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;
    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;

  • Background image for a Scene in JavaFX2.0

    Hi all,
    I am new to JavaFX2.0 and need to know how to set a background image for a scene.
    Thanks in advance.

    Hi,
    here is simple example:
    bgtest.css
    .root {
        -fx-background-image: url("mybg.jpg");
    }BackgroundImage.java
    package playground;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class BackgroundImage extends Application {
        StackPane root;
        Scene scene;
        Button button;
        public static void main(String[] args) {
            launch(BackgroundImage.class, args);
        @Override
        public void start(Stage stage) throws Exception {
            stage.setTitle("Custom Background Test");
            button = new Button("test");
            root = new StackPane();
            root.getStyleClass().add("root");
            root.getChildren().addAll(button);
            scene = new Scene(root, 600, 600);
            scene.getStylesheets().add(BackgroundImage.class.getResource("bgtest.css").toExternalForm());
            stage.setScene(scene);
            stage.centerOnScreen();
            stage.setVisible(true);
    }

  • Background Image for a Page

    Hi All,
    How to have a background image for a Portalpage? As Portlets are on the top of page,setting image in the Portal Style does not help.
    What's the wworkaround?
    Thanx

    I know,I can set the background image in the Page Template but in that case Portlets do not take that image as a background.Then It looks very awkward.
    How to solve this? Anybody at Oracle.
    Thanx

Maybe you are looking for