title: different background in borderpane javafx
body: <p>I am using a VBox in the left position of my parent layout BorderPane. I want to use a css file to change and use an image background on the left side of the BorderPane which contains my VBox. I have the following in my ccs file but cant manage it to work.</p>
  
  <pre><code> .vbox{
  -fx-background-image: url("/ui/image11.jpg");
  -fx-background-repeat: no-repeat;
  -fx-background-position: center center;
  -fx-background-size: 500 500;
  }
  
  .root{
  -fx-background-color: #ecf0f1;
  -fx-background-position: center center;
  -fx-background-size: 500 500;
  }
  
  .button{
  -fx-text-fill: #ecf0f1;
  -fx-background-color: #455d7a;
  -fx-position: center;
  -fx-min-width: 150px;
  -fx-transition-duration: 1;
  } 
  </code></pre>
  
  <p>With this css file, rules in .root and .button do apply but not on .vbox. How can I manage the backgrounds of the different sections in BorderPane.</p>
  
  <p>I import the css file with the following line of code:</p>
  
  <pre><code> scene.getStylesheets().add(this.getClass().getResource("/styles/contentStyle.css").toExternalForm());
  </code></pre>
  
  <p>Is this the correct way? The css file is in another package.</p>