I have some JavaFX checkboxes and want to style labels that I've assigned to them. I've put this in my .css file, but it doesn't change anything:
.check-box .label {
-fx-font-size: 18;
-fx-font-weight: bold;
}
What am I doing wrong?
Assuming that when you say you've "assigned labels to the check boxes" you mean that you've set text on them (either CheckBox cbox = new CheckBox("Check this"); or cbox.setText("Check this");, then you just need to omit the .label from the css:
.check-box {
-fx-font-size: 18;
-fx-font-weight: bold;
}