title: Left - align tab labels in JavaFX fixed-width tabpane
body: <p>When creating a tabpane with a defined min-tab-width, JavaFX will center the label of each tab.</p>
  
  <p>Is there a way to left-align the label? I've tried this:</p>
  
  <pre><code>package prv.rli.codetest;
  
  import javafx.application.Application;
  import javafx.scene.Scene;
  import javafx.scene.control.Tab;
  import javafx.scene.control.TabPane;
  import javafx.stage.Stage;
  
  public class TabPaneFixedWidthLeftAligned extends Application {
  
      public TabPaneFixedWidthLeftAligned() {
      }
  
      @Override
      public void start(Stage primaryStage) throws Exception {
          TabPane pane = new TabPane();
          pane.setTabMinWidth(150);
          pane.getTabs().addAll(new Tab("Bilbo"), new Tab("Baggins"));
          pane.getStylesheets().add("file:///home/rli/devel/repository/source/java/project/apps/CodeTest/src/main/java/prv/rli/codetest/test.css");
          Scene scene = new Scene(pane, 640, 480);
          primaryStage.setScene(scene);
          primaryStage.show();
      }
  
      public static void main(String[] args) {
          launch(args);
      }
  }
  </code></pre>
  
  <p>together with this css:</p>
  
  <pre><code>.tab-container {
      -fx-background-color: red;
      -fx-alignment: center-left;
  }
  
  .tab-label {
      -fx-background-color: blue;
      -fx-alignment: center-left;
      -fx-text-alignment: left;       
  }
  </code></pre>
  
  <p>while the background colors work (indicating I'm on the right track) I am unable to influence the text alignment of the label.</p>