problem with style of background color of a menu bar?

Hi all

I tried a style menu bar, but it seems I either do not correctly, or it does not.

what I found the syntax is
 -fx-background-color: Color; 
I tried to use black and nothing. I also tried
 -fx-color-: black;
and for some reason, the text color changes from black to white... weird...

I use Java 8 and there is something called 'Background', which I don't know too much how to use, but not too sure if I SHOULD use it.

I guess the setStyle would work as the use of a css file and call that, but I'm curious to know if it's something I'm doing or if it's a Java 8 bad bug: P.

Thank you all!

~ KZ

So is there a problem with 'setStyle' with Java 8, or is it with the menu bar?

I think that, it's probably a problem with your code or you are using an outdated version.

The following works fine for me, (Java 8 b 91, win7).

import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.*;

public class MenuBarStyling extends Application {
  @Override public void start(Stage stage) {
    Menu fileMenu = new Menu("File");
    fileMenu.getItems().setAll(
      new MenuItem("Save"),
      new MenuItem("Exit")
    );
    Menu editMenu = new Menu("Edit");
    editMenu.getItems().setAll(
      new MenuItem("Find...")
    );

    MenuBar menuBar = new MenuBar();
    menuBar.getMenus().setAll(
      fileMenu,
      editMenu,
      new Menu("Help")
    );
    menuBar.setStyle("-fx-base: forestgreen;");
// use the line below rather than the line above if you prefer
// adjusting only the background of the menu bar and not
// the base color of the entire menuBar menu system.
//    menuBar.setStyle("-fx-background-color: forestgreen;");

    stage.setScene(
      new Scene(
        new VBox(menuBar),
        300, 200
      )
    );
    stage.show();
  }

  public static void main(String[] args) { launch(args); }
}

Tags: Java

Similar Questions

  • Problem with the 2.0 (1.0) Spry menu bar re - CSS

    Hello:

    I'm having some trouble with a Spry (horizontal) 2.0 (1.0) menu bar I created.  Initially, I thought the problem was in what concerns the problems of rendering on IE 6.0, but the problem seems to be more general than that, and I came to believe that this has to do with the CSS created by the browser Widget and changed once imported in the Web page.  That's why I chose to post my question here rather than on the spry page.

    I leaned on the tutorial provided by David Powers (Bayside.css) and in addition any other documentation regarding the Spry UI bar menu.  The problem appeared as one of the 6 IE rendered page with a gap that is created when the menus appear, so push down the divs that appear below the page.

    However, through a laborious process of trial and error, my problem now seems to be that when I export the CSS generated by the browser widget to an external style sheet (the style sheet General governing the whole of the site), he comes into conflict with other CSS styles for links etc.  The end result is that all the padding, background colors, background images, and colors of text are lost.  As long as the CSS is in the head that this does not happen.

    My thought is that this must have to do with the problems of specificity, inheritance, etc.

    The site is available at the following ADDRESS: http://www.aclco.org/testing/index.html.  In its current form, all the CSS associated with the menu bar is located at the head of each page.  (see CSS below).

    My question is I can set up a separate style sheet for the menu bar horizontally and have these styles applied specifically (and only) in the menu bar my only alternative is to work through the rest of the General style sheet and the work by problems of specificity/inheritance - that may be the "best" practice , but it may create another 'cascading' [sic] problems elsewhere.

    Advice or suggestions or directed readings (which would point to a solution) that could be offered would be greatly appreciated.

    Steve Webster

    The horizontal CSS governing the menu bar is as follows: (currently the following CSS is embedded in the web page's head)

    < style type = "text/css" >

    / * - Start styles horizontal Spry Menu Widget 2.0 (1.0) menu bar-* /.


    / * BeginOAWidget_Instance_2141544: #MenuBar * /.
    / * Values for skinning a basic through presets menu. If the default settings are not sufficient, most count should be done in
    These rules, except for the images used to down or to the right pointing arrows, located in the SpryMenuBasic.css file

    They take the following classes of widget for layout of menu (located in a "Preset")
    . MenuBar - applies to all menu bars - default is a horizontal bar, all submenus are vertical - level 2 subs and beyond are drop down to the right.
    . MenuBarVertical - vertical main bar; All submenus are drop down to the right.

    You can also pass in extra classnames to set your desired top-level menu bar layout. Normally, they are defined by using a predefined setting.
    They apply only to the horizontal menu bars:
    MenuBarLeftShrink - the menu bar will be horizontally "shrinkwrapped" be just big enough to hold his items and left-aligned
    MenuBarRightShrink - as MenuBarLeftShrink, but right-aligned
    MenuBarFixedLeft - set to a specified width defined in rule "." MenuBarFixedLeft', and left-aligned.
    MenuBarFixedCentered - Fixed to a specified width defined in rule "." MenuBarFixedCentered',.
    and centered in its parent container.
    MenuBarFullwidth - expands to fill the width of the parent container.

    In general, all the rules specified in this file are prefixed by #MenuBar so that they don't apply to instances of the widget inserted along
    with the rules. This allows use of multiple MenuBarBasic widgets on the same page with different layouts. Due to limitations in IE6.
    There are a few rules where this was not possible. These rules are so noted in the comments.

    */

    {#MenuBar}
    background-color: transparent;
    do-family: Arial, Helvetica, without serif. / * Specify the fonts on the bar menu and submenu MenuItemContainer, so MenuItemContainer.
    MenuItem and MenuItemLabel
    at a given level all use the same definition for ems.
    Note that this means that the size is also inherited from the submenus of the child,
    so be careful when using other than relative sizes
    100% on the fonts submenu. */
    make-weight: normal;
    font size: 17px;
    make-style: normal;
    padding: 0;

    }
    / * ATTENTION: because ID + class selectors do not work correctly in IE6, but we want to restrict these rules to all this
    instance of widget, we used the concatenated string classnames to our selectors for the type of layout of the menu bar
    in this section. These have very low specificity, so be careful not to overstep accidentally. */

    . MenuBar br {/ * using only a class, so there same specificity that the "."} MenuBarFixedCentered br' rule bleow * /.
    display: none;
    }
    . {MenuBarLeftShrink}
    float: left; / * shrink the content, but also to float the menu bar * /.
    Width: auto;
    }
    . {MenuBarRightShrink}
    float: right; / * shrink the content, but also to float the menu bar * /.
    Width: auto;
    }
    . {MenuBarFixedLeft}
    float: left;
    Width: 80em;
    }
    . {MenuBarFixedCentered}
    float: none;
    Width: 80em;
    margin-left: auto;
    margin-right: auto;
    }
    . MenuBarFixedCentered br {}
    Clear: both;
    Display: block;
    }
    . MenuBarFixedCentered. Submenu br {}
    display: none;
    }
    . {MenuBarFullwidth}
    float: left;
    Width: 100%;
    }

    / * Top level bar small objects - these actually apply to all items and get substituted for the submenus level 1st or successive * /.
    #MenuBar. {MenuItemContainer}
    padding: 0px 0px 0px 0px;
    margin: 0;     / * Zero margin on the containers of items. The MenuItem is the active area of hover.
    For most elements, we have padding top or bottom or border only on MenuItem
    or a child so we keep all tiled submenu with elements.
    Definition of this 0 avoids the "dead zones" to hover. */
    }
    #MenuBar. {}, MenuItem
    padding: 10px 10px 10px 4px;
    background-color: #000088;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/navigation%20Bar%20Segm ent - Dark.png);
    background-repeat: repeat-x;

    }
    #MenuBar. {MenuItemFirst}
    border-style: none none no none;
    }
    #MenuBar. {MenuItemLast}
    border-style: none none no none;
    }

    #MenuBar. MenuItem. {MenuItemLabel}
    text-align: center;
    line-height: 1.4em;
    color: #ffffff;
    background-color: transparent;
    padding: 0px 18px 0px 5px;
    Width: 10em;
    Width: auto;
    }
    . SpryIsIE6 #MenuBar. MenuItem. {MenuItemLabel}
    Width: 1em; / * Equivalent to min-width in modern browsers * /.
    }

    / * First level of submenu items * /.
    #MenuBar. Submenu. {}, MenuItem
    do-family: Arial, Helvetica, without serif.
    make-weight: bold;
    font size: 15px;
    make-style: normal;
    background-color: #000088;
    padding: 0px 2px 0px 0px;
    border-width: 0px;
    border color: #cccccc #cccccc #cccccc #cccccc.
    / * Border styles are replaced by first and last items * /.
    border-style: solid solid no solid;
    }
    #MenuBar. Submenu. {MenuItemFirst}
    border-style: none;
    padding: 0px;
    }
    #MenuBar. Submenu. MenuItemFirst. {MenuItemLabel}
    padding-top: 0px;
    }
    #MenuBar. Submenu. {MenuItemLast}
    border-style: none none no none;
    }
    #MenuBar. Submenu. MenuItemLast. {MenuItemLabel}
    padding-bottom: 10px;
    }
    #MenuBar. Submenu. MenuItem. {MenuItemLabel}
    text-align: left;
    line-height: 1em;
    background-color: transparent;
    color: #ffffff;
    padding: 10px 10px 10px 10px;
    Width: 240px;

    }

    / * Hover States for containers, objects and labels * /.
    #MenuBar. {MenuItemHover}
    background-color: #2E35A3;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/navigation%20Bar%20Segm ent%20Light2.png);
    background-repeat: repeat-x;

    }

    #MenuBar. MenuItemWithSubMenu.MenuItemHover. {MenuItemLabel}
    background-color: transparent; / * expose this propeller separately * /.
    color: #ffffff;
    }
    #MenuBar. MenuItemHover. {MenuItemLabel}
    background-color: transparent;
    color: #ffffff;
    }
    #MenuBar. Submenu. {MenuItemHover}
    background-color: #2E35A3;

    }

    #MenuBar. Submenu. MenuItemHover. {MenuItemLabel}
    background-color: transparent;
    color: #ffffff;
    }
    / * The submenu - first-level submenus properties * /.
    #MenuBar. {SubMenuVisible}
    background-color: transparent;
    min-width: 0%;  / * This prevents the menu being lean that the parent MenuItemContainer - but not available on ie6 nice to have * /.
    border-style: none none no none;
    }
    #MenuBar.MenuBar. SubMenuVisible {/ * menu bar horizontally for only * /}
    top: 100%;    / * 100% is at the bottom of menuItemContainer parent * /.
    left: 0px; / * "left" may need tuning according to borders or padding applied to the bar MenuItemContainer or MenuItem,.
    and your personal taste.
    0px align left drop-down list with the content of the MenuItemContainer area. Assuming you keep the margins 0
    on MenuItemContainer and on the parent MenuItem
    menu bar, which in fact equals the sum of padding-left MenuItemContainer & MenuItem align
    the drop-down menu to the left of the menu item label.*.
    z-index: 10;
    }
    #MenuBar.MenuBarVertical. {SubMenuVisible}
    Top: 0px;
    left: 100%;
    min-width: 0px; / * Do not neeed to match the width of the parent MenuItemContainer - elements will avoid total collapse * /.
    }
    / * The sous-menu--deuxieme submenu level properties and beyond - are visible to descendants. MenuLevel1 * /.
    #MenuBar. MenuLevel1. {SubMenuVisible}
    background-color: transparent;
    min-width: 0px; / * Do not neeed to match the width of the parent MenuItemContainer - elements will avoid total collapse * /.
    Top: 0px;    / * If you want, you can move this down a smidge to separate the top item "submenu s of menubar.
    It is really necessary only for the submenu on the first point of MenuLevel1, or you can make it negative to make the submenu
    vertically 'centered' about his call to * /.
    left: 100%; / * If you want to move the submenu on the left to partially cover the point of his call, you can add a margin to the left with a
    negative value to this rule. Alternatively, if you use the elements of fixed width, you can change this value on the left
    to use px or ems to get the desired offset. */
    }
    / * IE6 rules - you can remove these if you do not want to support IE6 * /.

    / * Note about several classes in IE6.
    Some rules above use several class names to an element of selection, such as "hover" (MenuItemHover) and 'a a submenu' (MenuItemWithSubMenu).
    * give the selector '. MenuItemWithSubMenu.MenuItemHover'.
    * Unfortunately, IE6 does not support using mutiple classnames in a selector for an element. For a selector like '. foo.bar.baz', IE6 does not take into account
    * all but the final classname (here, ".baz") and defines the specificity in consequence, with only one of these classs as significant. To work around this problem
    * problem, we use the plugin in SpryMenuBarIEWorkaroundsPlugin.js to generate classnames for IE6, such as "MenuItemWithSubMenuHover".
    * Given that many of these necessary, the plugin does not generate additional classes for modern browsers, and we use the copies of CSS2 style class
    * syntax for that. Since IE6, both apply the rules where the
    * It should not and gets the specificity wrong too, we have rules of order carefully, then misapplied rule in IE6 can be overridden.
    * So we put first the multiple class rule. IE6 wrongly apply this rule.  We follow this with the single class rule that it would be
    * replace by mistake, by ensuring that the specificity of IE6 interpreted as is the same as the unique class selector, so the latter wins.
    * We then create a copy of the rule of multiple class, adding a "." SpryIsIE6' in the context of the class and to ensure that the specificity
    * the selector is high enough to beat the rule of single class in the case of "match of these two classes. We place the rule of IE6 at the end of the
    * block of css styling to make it easy to remove if you want to drop support for IE6.
    * If you decide you do not need IE6 support, you can get rid of these, as well as the inclusion of the SpryMenuBarIEWorkaroundsPlugin.js script.
    * The 'SpryIsIE6' class is placed on the HTML element by the script in SpryMenuBarIEWorkaroundsPlugin.js if the browser is Internet Explorer 6. This avoids the need of IE conditional comments to these rules.
    */
    . SpryIsIE6 #MenuBar. MenuBarView. MenuItemWithSubMenuHover. MenuItemLabel / * selector IE6 * /}
    background-color: transparent; / * expose this propeller separately * /.
    color: #ffffff;
    }
    . SpryIsIE6 #MenuBar. MenuBarView. Submenu. MenuItemWithSubMenuHover. MenuItemLabel / * selector IE6 * /}
    background-color: transparent; / * expose this propeller separately * /.
    color: #ffffff;
    }
    . SpryIsIE6 #MenuBar. Submenu. Submenu / * selector IE6 * /}
    left margin:-0px; / * Offset at least part of a version of 'double upholstery' bug IE6 'double margin "* /.
    }


    / * EndOAWidget_Instance_2141544 * /.

    / * End Spry Menu Bar Widget 2.0 (1.0) Horizontal Menu Custom styles * /.


    < / style >

    The CSS for the site in general is reproduced below: (my belief is that it is a: link, a: visited, a: hover, a: active styles that may be in conflict).

    @charset "utf-8";


    {body
    Police: 100% Verdana, Arial, Helvetica, without serif.
    min-height: 0; / * this is necessary to overcome the "haslayout" bug found in Windows 7 in conjunction with IE8.  For more information see: URL - http://reference.sitepoint.com/css/haslayout.html * /
    margin: 0; / * It is advisable to zero, the margin and the filling of the body to hold element has a different default browser * /.
    padding: 0;
    text-align: center; / * This allows the centering of the container and overcomes an inherent bug in IE 5 * /.
    Color: #000000;
    list-style-image: none;
    background-color: #FCFCFC;

    }

    H1, h2, h3, h4, h5, h6 {}

    color: #000066;

    }

    a: link {}
    color: #151A 96.
    text-decoration: underline;
    }
    a: visited {}
    text-decoration: underline;
    color: #1B8DCD;
    }
    a: hover {}
    text-decoration: none;
    color: #F30A0A;
    }
    a: active {}
    text-decoration: underline;
    color: #151A 96.
    }

    #container {}
    Width: 960px;
    margin: 0 auto; / * margins (in conjunction with a width) auto Center the page * /.
    text-align: left; / * This setting overrides the text-align: center on the body element. */
    background-image:
    URL (.. / ACLCO%20Graphics%20-%20Web%20site%20Parts/Website%20Midsection%20_960.png);
    background-repeat: repeat-y;
    }

    #header {}
    padding: 0;  / * This filling is the alignment to the left of the items in the div that appear below. If an image is used in the #header instead of text, you can remove the padding. */

    Width: 960px;
    height: 332px;
    background-image:
    URL (.. / ACLCO%20Graphics%20-%20Web%20site%20Parts/Website%20Header_960.png);
    background-repeat: repeat no.;
    }


    #header h1 {}

    margin-right: 0px; / * zero setting of the margin of the last element in the #header div tag will prevent the collapse of margin - inexplicable space between divs. If the div has a border around it, this isn't necessary, which also allows to avoid the collapse of margin * /.
    padding: 0; / * padding instead of margin will allow you to keep the edges of the div element * /.
    display: none;

    }

    #header img {}
    display: none;
    }

    {#Main_nav_contents}
    padding: 0;
    margin-top: 0px;
    height: 39px;
    Width: 950px;
    padding-top: 275px;
    padding-left: 39px;
    z index: 3;

    }

    {#MenuBarVertical}
    margin-bottom: 50px;
    padding-top: 50px;
    padding-bottom: 200px;
    padding-left: 15px;
    padding-right: 15px;

    }


    {.mainContent_left}
    margin: 0; / on this div element right margin creates the column on the right side of the page - no matter how content div the sidebar1″ contains, the space of the columns will remain. You can remove this line if you want the #mainContent div text to fill the space of #sidebar1 when the content of #sidebar1 is complete. */
    padding-left: 30px;
    padding-right: 20px; / * Remember that the fill is space inside the box of div and margin is the space outside the div box * /.
    Width: 600px;
    float: left;
    }


    {.sidebar_right}
    float: right; / * because this element is floating, it takes a width * /.
    Width: 270px; / actual width of this div, in browsers comply with the standards, or the standard mode of Internet Explorer includes the padding and border in addition to width * /.
    top of the margin: 30px;
    margin-left: 0;
    margin-right: 10px;
    font-size: 90%;

    }

    {.mainContent_right}
    margin-left: 10px;
    padding-left: 30px;
    padding-right: 20px;
    Width: 600px;
    float: right;

    }

    {.sidebar_left}
    float: left; / * because this element is floating, it takes a width * /.
    Width: 270px; / actual width of this div, in browsers comply with the standards, or the standard mode of Internet Explorer includes the padding and border in addition to width * /.
    top of the margin: 30px;
    margin-left: 30px;
    margin-right: 0;
    overflow: hidden;
    font-size: 90%;

    }

    {.main_content_centered}
    Width: 650px;
    margin left: 155px;

    }

    {.main_content_centered_header}
    margin left: 75px;


    }

    {.sidebar_textbox}
    margin: 0px;
    Width: 260px;
    padding: 2px;
    }


    {.sidebar_textbox_header}

    Width: 255px;
    height: 58px;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/portrait%20Textbox%20he ader.png);

    }

    {.sidebar_textbox_background_middle}

    Width: 255px;
    padding-top: 12px;
    padding-bottom: 10px;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/portrait%20Textbox%20Mi ddle.png);
    background-repeat: repeat-y;
    }

    {.sidebar_textbox_content}
    / * The width and filling are fixed as follows to reflect the quirks in the rendering of the browser while ensuring that the text is contained in the background of the text box * /.

    Width: 230px;
    padding-left: 20px;
    padding-right: 40px;
    }

    {.sidebar_textbox_footer}

    Width: 255px;
    height: 64px;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/portrait%20Textbox%20Foo ter.png);

    }

    #issues_menu a: link {}
    color: #151A 96.
    text-decoration: none;
    make-weight: bold;

    }


    #issues_menu a: visited {}
    color: #151A 96.
    make-weight: bold;
    text-decoration: none;

    }

    #issues_menu a: hover {}
    color: #F30A0A;
    make-weight: bold;
    make-style: oblique;
    text-decoration: none;

    }

    #issues_menu a: active {}
    color: #151A 96.
    make-weight: bold;
    text-decoration: none;

    }

    {#archives}
    padding-top: 15px;
    padding-right: 15px;
    padding-bottom: 20px;
    padding-left: 0px;

    }

    {.landscape_textbox}
    Width: 500px;
    margin-right: 0px;
    margin left: 30px;
    padding-top: 35px;.
    padding-bottom: 25px;
    make-style: normal;
    make-weight: normal;

    }

    {.landscape_textbox_hdr}

    Width: 500px;
    height: 38px;
    margin: auto;
    padding: 0;
    background-image:
    URL (.. / ACLCO%20Graphics%20-%20Web%20site%20Parts/Landscape%20Textbox%20Header.png);

    }

    {.landscape_textbox_middle}

    Width: auto;
    margin: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/landscapte%20Textbox%20 Middle.png);
    background-repeat: repeat-y;

    }

    {.landscape_textbox_content}

    Width: 450px;
    Padding: 25px;
    }

    {.landscape_textbox_ftr}

    Width: 500px;
    height: 44px;
    margin: auto;
    padding: 0;
    background-image: url (.. /ACLCO%20Graphics%20-%20Web%20Site%20Parts/Landscape%20Textbox%20F ooter.png);

    }


    #footer {}
    padding: 0; / * This filling is the alignment to the left of the items in the div that appear above him. */
    Width: 960px;
    height: 222px;
    background-image:
    URL (.. / ACLCO%20Graphics%20-%20Web%20site%20Parts/Website%20Footer%20_960.png);
    background-repeat: repeat no.;

    }

    #footer p {}
    margin: 0px; / * zero setting the margins of the first element in the footer will avoid the possibility of the collapse of the margin - a space between the div tags * /.
    padding: 0px; / * padding on that element will create space, just as it would the margin, free margin collapse question * /.
    text-align: center;
    margin-left: 50px;
    right margin: 50px;
    padding: 10px;
    font size: small;
    }

    #footer h5 {}

    text-align: center;

    }

    .fltrt {/ * this class can be used to float right to the item in your page.} The floating element must precede the element it should be next to the page. */
    float: right;
    left margin: 8px;
    }
    .fltlft {/ * this class can be used to float an element on your page to the left * /}
    float: left;
    right margin: 8px;
    }
    .clearfloat {/ * this class must be placed on an element div or break and should be the last item before closing a container should completely contain a float * /}
    Clear: both;
    height: 0;
    font size: 1px;
    line-height: 0px;
    }


    {.dropcap}
    display: block;
    float: left;
    line-height: 80%;
    font size: 250%;
    make-weight: bolder;
    color: #000066;
    Padding: .1em .03em 0 0;
    }

    {.red_arrows}
    list-style-position: outside;
    list-style-image: url (.. / ACLCO%20Graphics%20-%20Web%20site%20Parts/Arrow%20Large.png);
    }

    {.blue_bullets}
    list-style-position: outside;
    list-style-image: url (.. / ACLCO%20Graphics%20-%20Web%20site%20Parts/Bullet%20Medium%20Full.png);
    }

    attention {}
    color: #F30A0A;
    font-size: x-large;
    do-family: Georgia, "Times New Roman", Times, serif;
    make-style: italic;
    Police-weight: 900;
    }

    {.attention_small}
    color: #F30A0A;
    font size: large;
    do-family: Georgia, "Times New Roman", Times, serif;
    make-style: italic;
    Police-weight: 900;
    }

    .table {}
    table-layout: fixed;

    }
    . Blue {}
    Color: #00F;
    }
    #container .mainContent_left p .blue {}
    color: #0303A 0;
    }

    Hello Steve

    Well, I checked your page in IE6 and it seems to work fine for me except that here seemes to be a little space between

  • items that may be due to lack of support of .png?  In other words, if there is a little transparency on the edge of the chart?  Maybe it's more a shot in the water on my part!

    Now my suggestion to you would be to mark this thread as closed/replied and after again with just the link to the page and your question.  Short is sweet.

    Martin

  • Background color on the menu bar

    I am inserting a spry menu bar in the top of my page. It is one level, there is no submenus. In order to insert it into the container space, I made each item fixed wide, and I have 5 pixels left over. So I stuffed the ul on the left with 3 pixels, which gives the effect of the centering menu bar. The menu bar has a background color applied. But now I have a 3 pixel on the left (and 2 pixels on the right) space which is white space. How can I get that white space the same color as the menu bar? I tried to apply a color to the div menu bar, to the definition of the ul and put a div around the bar of menus together, but none of these works. Is it possible to apply this background color so that the entire line is the same color?

    Thank you

    Mike

    In the sections, change it.

    {#menu}
    background-color: # 526-39;
    }

    on this subject.

    {#menu}
    background-color: # 526-39;

    overflow: hidden;

    Zoom: 1;
    }

  • I'm a noob and have problems with several buttons on the pages of menu bar

    Hi all

    I'm building a site of basic database for my local community, and everything is fine until I try to add more script for the command buttons on the pages in the menu. The menu has 7 buttons that work, then on each of these pages are more than 6 buttons. The first page works fine but when I add the code to the following page to control its buttons access of undefined prop. error and continues to play through any chronology. It's the im code using control buttons on the pages in the menu. If someone could help that would be great.

    Nothing particularly wrong with the code you show it, it is more likely a matter of trying to affect a bad code.  If you can view the actual error message you get can narrow the problem... before that if you go in your publish the Flash settings section and select the option to enable debugging, the error message will have a bit more info in there.

    If you can describe this scenario where you have other buttons on other pages as well as how these pages differ from each other, which can be useful as well.  What are all the labels image linked to... the main timeline?  Is - this code on the main timeline or in the pages?

  • Strange problem with measurement of the color under Mac.

    Hello, I have a strange problem with measurement of the color under Mac. For example I create a gradient in Photoshop color 200 200 200 color 240 240 240. When I measure the color of the gradient with the Photoshop color measurement tool or with the built in OS X color measurement tool measured color is of 200 199 197 to 240 240 238. I measured the same gradient with Photoshop for PC and the values are OK (the same values that I create).

    I don't know what the problem is, but I think that the colors that I create are the same I have measure after creating them and also values between Mac and PC. I appreciate much help or information you could give me that helps me understand what is happening here.

    Thank you for your time

    Marcelo.

    Yep, you guessed it, evidence as monitor basically removes all profiling and just offer it right.

    is it possible to make the OS X color measurement tool to measure the original color values

    You mean the colors of paper - No., as I said photoshop filter your image through the profile document, proof of installation and the monitor profile. Why use Digital color meter for this though?

    I don't understand what is measurement of color values that will change every time point calibrate it my monitor.

    Because color values are "larger" what is on your monitor. Your monitor (via photoshop) makes only the best he can to display these values, which can be anything from LAB colors outside the range of your monitor - to the CMYK color. Calibration, it is the only way to allow your monitor to do this in any way accurately. (never really impossible) The monitors have a certain range and are only representations / would the REAL colors who is the holder of a document, with a profile. There's only one good reason to measure the monitor values so that is to build a monitor profile.

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • The color of the menu bar

    Why is the color of the menu white on Windows 10 bar?

    How can I change the color of GUI by default?

    Using one of these high-contrast themes?

    N °

    2. can you get color (same color with the Lr GUI) menu bar on the default Windows theme?

    I don't think you can do this with all the customization options.

    My Ps menu bar has the same color with the GUI under the default Windows theme... but Lr does not work.

    It seems that LR uses the current Windows theme to choose the colors of the menu bar (do like most Windows applications), while the PS is not.

  • Problem with styles Css does not display mode live view or when I browse

    I use Mac OS x 10.6 and construction Web site with Dreamweaver CS5.  I sometimes create div tags no styles or rendering mode display live view or when I browse but showing in design mode. I looked in dreamwever faq and they speak not no projection in Design view to toggle the display styles. This isn't the problem because it is checked, and I tried to turn on and off and made no difference. I use the firefox browser.


    It happened before the other day too. But all my other pages of this website that I created in the same way the construction with DIV tags and css styles So, not sure what is the problem. Maybe someone has a suggestion here.


    Johanna

    http://johannabresnahan.com/CSS/jbstyles.CSS

    {Line 420 is missing a closing brace} for the rest of the style sheet is either misinterpreted, including rules #mm1thumb and #mm2thumb.

    #footer {}
    background-color: #263f64;
    Clear: both;
    float: left;
    height: 150px;
    Width: 881px;
    position: relative;
    do-family: "Lucida Sans Unicode", "Lucida Grande", without serif.
    do-size: 9pt;
    make-style: normal;
    line-height: 9pt;
    make-weight: normal;
    do-variant: normal;
    text-transform: none;
    color: #FFF;
    text-decoration: none;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    text-indent: 525px;
    } / * THIS CLOSING BRACE IS MISSING * /.

  • Problem with the PrintJob background and default

    Hello, I have a problem with PrintJob - print in pdf format.

    I want to print bitmaps with transparency and vectors.

    I checked all the options and still have a gray background under the bitmaps and vectors. This is the background color from scene.

    It seems to me that flash is printing in bitmap mode no matter what I do.
    Anyone know how to print MovieClip/Bitmap without default background. I send to print bitmap/movieclip with transparency, but the output is always packed bitmap.

    var pj:PrintJob = new PrintJob();
    var sheets:MovieClip;// = new Sprite();
    var options:PrintJobOptions = new PrintJobOptions();
    options.printAsBitmap = false;
    var dodd:MovieClip = new MovieClip();
    stage.addChild(dodd);
    var pagesToPrint:uint = 0;
    if (pj.start()) {
        for (var i:int = 0; i < pages.length; i++)
        {
            sheets = new MovieClip();
            //sheets.graphics.beginFill(0xFF0000, 0);
            //sheets.graphics.beginBitmapFill(pages[i].getChildAt(0).bitmapData, null, false, true);
            /*sheets.graphics.lineStyle(0,0,0);
            sheets.graphics.drawRect(0, 0, pj.pageWidth, pj.pageHeight);
            sheets.graphics.endFill();*/
            sheets.addChild(pages[i]);
            dodd.addChild(sheets);
            try {
                pj.addPage(sheets, new Rectangle(0, 0, pj.pageWidth, pj.pageHeight) , options);
                pagesToPrint++;
            }
            catch(e:Error) {
                // do nothing
            }
        }
        if(pagesToPrint > 0) {
            pj.send();
        }
       
        while(dodd.numChildren>0){
            dodd.removeChildAt(0);
        }
        stage.removeChild(dodd);
        dodd = null;
       
    }
    
    

    using actionscript, create "pages" with a white background and content you want, and then print these new pages.

  • Active window color problem - cannot change the background color

    original title: Active window color problem

    By right-clicking: Desktop, then click on: personalization / window color and appearance / settings (Advanced) appearance, Windows user can assign a background color of the active window in any application.  This is useful for those of us who don't want a stark white screen; We can assign a mild pastel tint which may be easier on the eyes for long term sessions.

    At some recent point, I lost the background color of the active window within Windows uses 'household.  I still not my background color assigned in any application I run (Word, Mail, etc.), but using Windows Explorer to navigate through my hard drive, the active window is now always the default stark white Windows.  How this change and can it be forced to adhere to the assigned active window background color?

    Hello

    Step 1: Check if the problem continues in a new user account.

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-a-user-account

    Step 2: If the problem does not persist in a new user account, then the old profile could have been corrupted. Try the following article to fix a corrupted user profile.

    http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile

  • Problem to get the background color

    Mr President, in my code, I wasn't able to use fully all the width of the screen,

    This is my code

    public class HorizontalField extends VerticalFieldManager
    {
       HorizontalFieldManager sd=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
       HorizontalFieldManager r1=new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
       MySeparatorField ds=new MySeparatorField();
       Font fnt,fntv;
        HorizontalField()
        {
           fnt = this.getFont().derive(FontFamily.SCALABLE_FONT, 14);
           fntv = this.getFont().derive(FontFamily.SCALABLE_FONT, 11);
           r1.setFont(fntv);
           /*---------------------Heading-----------------------------------*/
           DateField dd=new DateField("Date");
    
           dd.setFont(fnt);
           sd.add(dd);
          /*------------------*/
           MyLine s=new MyLine();
           sd.add(s);
           Desp d1=new Desp("Description");
           d1.setFont(fnt);
           sd.add(d1);      
    
           /*_________________*/
           MyLine s1=new MyLine();
           sd.add(s1);
    
           Amt d2=new Amt("Amount");
           d2.setFont(fnt);
           sd.add(d2);
           add(new SeparatorField());
           add(sd);
           add(new SeparatorField());
    
               DateField dfr=new DateField("13.08.09")
               {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(dfr);
               MyLine sr=new MyLine();
               r1.add(sr);
               Desp dr=new Desp("Reent")
               {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(dr);
               MyLine sra=new MyLine();
               r1.add(sra);
               Amt amtr=new Amt("5000")
                 {
                   public void paint(Graphics g)
                   {
                        g.setBackgroundColor(Color.RED);
                        g.clear();
                        super.paint(g);
                   }
               };
               r1.add(amtr);
               add(r1);
               add(new SeparatorField());
    
           }
    
        }
    
     class DateField extends LabelField
    {
         DateField(String s)
        {
            super(s,LabelField.LEFT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*2/10;
        }
    
    }
    
      class Desp extends LabelField
    {
         Desp(String s)
        {
            super(s,LabelField.RIGHT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*5/10;
        }
    
    }
    
      class Amt extends LabelField
    {
        Amt(String s)
        {
            super(s,LabelField.RIGHT);
         }
        public  int getPreferredWidth()
        {
            return Display.getWidth()*4/10;
        }
    
    }
    

    MyLine code is

    public class MyLine extends LabelField
    {
        int width,height;
    
        ButtonField dd;
        MyLine()
        {
            width=1;
            //height=200;
        }
         MyLine(int w)
        {
            width=w;
            //height=200;
        }
    
         public int getPreferredWidth()
            {
                return width;
             }
    
         public void paint(Graphics g)
                {
                       // g.setBackgroundColor(Color.BLUE);
    
                     g.drawLine(0,0,0,70);
                }
    }
    

    When I call this HorizontalField I get the result, but in the amount column (i.e. red) background color I get half of this label, I don't know what problem I did

    Thank you

    The problem is in your calculation of width.

    Your should calculate your width in such a way that (approximate):

    Display.getWidth () = DateField width, width PED, Amt width + 2 * MyLine width;

    Furthermore, a solution may be simply change your constructor Amt class as below:

            Amt(String s)        {                   super(s,LabelField.RIGHT | Field.USE_ALL_WIDTH);        }
    

    Concerning

    Bika

  • Problem with adding a background - please help!

    Hi all

    I try to create my first BB app and run into a few problems with the addition of a background image on my screen.  I try to activate the background on my request without using the class BackgroundFactory I need this works for older BB models.

    I use EncodedImage so that I can to scale the context in which any size of BB.  I am aware of the loss of the aspect ratio, this isn't a problem for me.

    Here is my code:

    The background image.
    backgroundImage = EncodedImage.getEncodedImageResource("img/image.png");
           
    int currentWidthFixed32;
    int currentHeightFixed32;
    int requiredWidthFixed32;
    int requiredHeightFixed32;
    int scaleXFixed32;
    int scaleYFixed32;
           
    Get the dimensions of the current image in fixed-point number
    currentWidthFixed32 = Fixed32.toFP (backgroundImage.getWidth ());
    currentHeightFixed32 = Fixed32.toFP (backgroundImage.getHeight ());
           
    Get the dimensions of the image necessary in fixed-point number
    requiredWidthFixed32 = Fixed32.toFP (Display.getWidth ());
    requiredHeightFixed32 = Fixed32.toFP (Display.getHeight ());
           
    Calculate the scale factor
    scaleXFixed32 = Fixed32.div (currentWidthFixed32, requiredWidthFixed32);
    scaleYFixed32 = Fixed32.div (currentHeightFixed32, requiredHeightFixed32);
           
    Resize the image
    backgroundImage = backgroundImage.scaleImage32 (scaleXFixed32, scaleYFixed32);
    Imagearriereplan = backgroundImage.getBitmap ();

    Display display = new MainScreen();

    VerticalFieldManager verticalFieldManager = new VerticalFieldManager)
    VerticalFieldManager.USE_ALL_WIDTH |
    VerticalFieldManager.USE_ALL_HEIGHT |
    VerticalFieldManager.NO_HORIZONTAL_SCROLLBAR |
    VerticalFieldManager.NO_VERTICAL_SCROLLBAR |
    VerticalFieldManager.NO_HORIZONTAL_SCROLL |
    VerticalFieldManager.NO_VERTICAL_SCROLL) {}

    Override the paint method to draw the background image.
    {} public void paint (Graphics graphics)
    Draw the background image, then paint.
    graphics.drawBitmap (0, 0, backgroundBitmap.getWidth (), backgroundBitmap.getHeight (), Imagearriereplan, 0, 0);
    Super.Paint (Graphics);
    }
    };
    Add the handler to the screen.
    mainScreen.add (verticalFieldManager);
           
    VerticalFieldManager vfm2 = new VerticalFieldManager)
    VerticalFieldManager.NO_HORIZONTAL_SCROLLBAR |
    VerticalFieldManager.VERTICAL_SCROLLBAR |
    VerticalFieldManager.NO_HORIZONTAL_SCROLL |
    VerticalFieldManager.VERTICAL_SCROLL);
           
    verticalFieldManager.add (vfm2);
           
    The LabelField will be visible through the transparent image.
    LabelField labelField is new LabelField ("is a label");.
    ButtonField buttonField = new ButtonField ("asdf");

    Add the fields to the Manager.
    vfm2. Add (labelField);
    labelField = new LabelField ("this is a label");
    vfm2. Add (labelField);
    labelField = new LabelField ("this is a label");
    vfm2. Add (labelField);
    labelField = new LabelField ("this is a label");
    vfm2. Add (labelField);
    labelField = new LabelField ("this is a label");
    vfm2. Add (labelField);
    labelField = new LabelField ("this is a label");
    vfm2. Add (labelField);

    vfm2. Add (buttonField);
    buttonField = new ButtonField ("asdf2");
    vfm2. Add (buttonField);
    buttonField = new ButtonField ("asdf3");
    vfm2. Add (buttonField);
    buttonField = new ButtonField ("asdf4");
    vfm2. Add (buttonField);
    labelField = new LabelField ("this is a label");
           
    Tap on the screen.
    pushScreen (mainScreen);

    I want the "image.png" to act as a 'real' background, however, when I run the above code, the image.png appears in the form of the background, but when I scroll down, the background scrolls as well, and I see a white space.  I want to have "image.png" would you like the background permanently and add another manager who would be scrolling if scrolling is required.

    What I'm doing wrong here?  Why I can't see the vertical scroll bar and why the background is not scrollable?

    Any help is appreciated!

    See you soon!

    Make sure that you set the FullScreen.DEFAULT_MENU property - this will give you the default system menu items.

    You add your menu items by substituting makeMenu().

  • Recent update is causing a problem with style on the leaves of masters

    Hello

    I've just updated Muse and I have another question with a master style sheet font and paragraph styles.


    The homepage looks like which is as it should be.  It has its own master page

    Home should look like this.png

    The other pages of the site look like this (see below) - the school text logo has been lost, the two missing buttons and the footer text of page is now black and not white and also is not justified and not centered but this arises out of the same master page.

    The only page that keeps the styling is the homepage.

    I tried to remove the text and styles of text by default re-adding, change - the only option would be to remove the main master page which I do not if it can be helped.

    About Us - looks like this.png

    I had this problem with the last update, but got around it by changing the default text styles - but that does not work now.

    I have 20 + sites set up like that.  I don't want to put hours of work into the sorting issues if it can be helped.

    Any information relating to this issue would be helpful

    Thank you


    Simon

    Hi Simon,.

    Please try to turn off 'IBE' (aka of editing in the browser) in the Panel "Advanced" dialog "Properties of the Site" within the Muse and the re - publish and check if that corrects the problem, the cause is something that we are aware and working on a fix for.

    Kind regards

    _Ankush

  • Problems with .chart-field-background and event managers

    Hello. I am trying to add event handlers to my chart, so that the user can be allowed, click in the chart itself to perform certain actions such as moving, zooming, etc.. To avoid having to deal with the manipulation of mouse clicks that are not the card itself (for example on the axes), I found that:

    . Chart-field-background

    is the area which gives me all of the graphic and nothing else. However, when I move the mouse listeners in this region, the event is recorded only on half of the cells in the table. If you've seen the lack of available JavaFX graphic of background, you know that it contains lines in alternation of cells with a slightly different color. I found that only lines with lighter gray coloring record actually a mouse click on them, which makes me believe that dark grey cells do not form part of the background-field-.chart, but something else on top.

    For me, this is is a failure in the way the map regions are defined. Why can't I get a listener to work in the graphical overview and nothing else? Currently, the only solution seems to be to take the region:

    . Chart-content

    instead and calculate the difference between this region and the .chart field bottom to manually remove mouse clicks that are outside .chart-field-background.

    Someone at - it suggestions? This is true on the JavaFX Jira issue?

    Hello

    I'm not an expert on controls, but here is my suggestion based on your description: when you register an event handler on a node of "substance", it is called only when the mouse points to the context node - I assume that light gray is the transparent and gray with light gray cells background dark cells to fill. So the behavior seems OK - you can't wait for the events to be delivered at bottom when it is covered by the other nodes. I think you should really register Manager on all of the graph and filter events that you do not want to manage. However, this should not require a large part of the calculation of the difference between the regions, it should be possible to do just something like

    if (!background.contains(event.getX(), event.getY())) {
        return;
    }
    

    I hope that does not reach the bottom under the axes as well. Note that if there is the various transformations between the background and the node with the Manager on it, you may need to regenerate the coordinates of

    background.sceneToLocal(event.getSceneX(), event.getSceneY());
    

    And use the method that contains it.

  • Problem with styles of framework and the paragraph of text

    I have a book with a number of documents in it. In one of the documents, there is a problem with blocks of text and paragraph styles. When I create a new text frame, text in it and apply a paragraph style, the style does not apply correctly. Elements of applied and others do not. For example, bullets and numbered lists apply but italic, and font size are not. It only happens with new blocks of text, and the oldest work very well.

    This does not happen in other documents, just one.

    The book is properly synchronized and synchronization options include all options.

    Check your panels styles, paragraph, character and the object with nothing selected. If there is an already established style name, and I think that it would be in the Panel character styles, that's your problem.

    Bob

Maybe you are looking for