0

I need to add an image to title. I know how to do that in java code. But I want to do that via css only. I tried:

.titled-pane > .title{
  -fx-graphic: url("imgs/general/logo.png");
}

and

.titled-pane {
  -fx-graphic: url("imgs/general/logo.png");
}

But it did not help.

Update: Resources paths.

/src/main/resources/styles.css
/src/main/resources/imgs/general/logo.png
/src/main/resources/fxml/window.fxml
rvit34
  • 1,967
  • 3
  • 17
  • 33

1 Answers1

0

Try this -fx-background-image: url("")

ground
  • 76
  • 1
  • 10