How to refer to an anchor pane in css?

Tags: css,javafx,pane

Problem :

is there a possibility to refer to an anchor pane in css?

If the anchor pane happens to be the root, than it's ok:

-fx-background-image: url("xxx.yy");

It works. But if not, then how to do this? I tried .anchor-pane{}, it didn't work. Then I read, that anchor pane has everything that Pane has. So I tried .pane{} too... It didn't work.

How can I set the background to a none root anchor pane? Thank you!

Solution :

You can always assign a css class and add it to the AnchorPane explicitly


In your css :

    -fx-background-image: url("xxx.yy");

You can perform the same by adding a css id


In you css :

    -fx-background-image: url("xxx.yy");

    CSS Howto..

    How to vertically align text over an image

    How to crop image with css

    jquery style sheet switcher - how to effect only theme css?

    How can I get this effect (on height) with jquery?

    How to resize a chosen jquery dropdownlist on windows resize

    Show DIV message at every “X” number of minutes?

    How to resize divs based on screen width with any approach [closed]

    How to make submenus have the same width as the menu CSS/HTML5

    How can I push the primefaces DefaultMenuModel before an accordion panel?

    How to horizontally align a list of contacts?

    gulp-cssmin: How to change relative URLs in minified CSS

    How to center vertically child elements inside div [duplicate]

    how to create bar code like in a horizontal line using css (For Email)

    jQuery-Based Dropdown Shows Gap Outside of Firefox

    How to add Indian rupee symbol to the RadioButtonList control in using CSS design

    how to center a div in a td cell and a link inside of it ?both vertically and horizontally?

    How can I align a text that has a specific width at the center of a div?

    How to Style Template field in Grid View (aspx page and CSS attached)

    How to color the Horizontal and Vertical Lines at (0,0) darker in JavaFX

    how to make a box of nxn given in a url?

    How to reload CSS when using Less.js

    Showing ellipsis in CSS table-cell element

    CSS: How can I make the pop over menu clickable?

    How to disable selection with specific class with js/css?

    How to alter hover effects for image button and embedded text?

    How to achieve this view?

    How to do like this list using
  • and CSS?
  • How can I make responsive JQuery left margin?

    How to get inner and outer width to a single element?

    How can I see “:hover” and “:active” properties of elements on a webpage? [duplicate]