title: How do I set the background color of an anchorpane with CSS in Java FX
body: <p>In my FXML document I have the following code: </p>
  
  <pre><code>&lt;AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" styleClass="header-bar" stylesheets="@standards.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"&gt;
  </code></pre>
  
  <p>My css looks like this:</p>
  
  <pre><code>.header-bar
  {
  -fx-background-color: blue;
  }
  </code></pre>
  
  <p>However this doesn't change the color.  However, if I change my FXML to do the exact same thing inline, then it works.</p>
  
  <p></p>
  
  <p>The weird thing is my other styles are applied correctly in the same FXML document.</p>
  
  <p>Any help would be greatly appreciated.  </p>
  
  <p>I am using SceneBuilder to prototype screens, and need to be able to rely on CSS applications.</p>
  
  <p>Thanks!</p>