I\'m trying to style some textfields using JavaFX, but I\'m not getting desired results. My goal is to have the textfield be represented by a singular underline. Here\'s my
Since you only want an underline, the minimum things you will need are
.text-field {
-fx-border-color: grey;
-fx-border width: 0 0 1 0; // top, right, bottom, left
-fx-background-color: transparent;
}
This will change the border color to grey, set the border width to 0 for everything but the bottom border, and back the textfield's background transparent so it is not white.