Edit MenuBar with Css in JavaFx


Question

Thanks for reading. I have trying to edit a menu-bar with css but the menu item don't changed.

I realized the parts of menu-bar are: Menubar, menu, menu-items but the last one don't work rightly. Help

.menu-bar{
  -fx-background-color: peru;
  -fx-border-color:  #f0cd90;
 -fx-border-width: 2

}

.menu-bar .label {
    -fx-font-size: 25 pt;
    -fx-font-family: "Segoe UI Light";
    -fx-text-fill: #dedede;

}


.menu:hover {
    -fx-background-color: #bc784e;
}

.menu-item .label{
     -fx-font-size: 25 pt;
    -fx-label-line-length: 8;
      -fx-background-color: #cc66ff;
}

I'm using Scene builder.

1
3
8/8/2013 3:36:37 PM

Accepted Answer

Make:

.menu .label{     -fx-text-fill: black;}

Reference: https://forums.oracle.com/message/10402062

3
10/25/2013 4:16:37 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon