0

I am styling a checkbox inside a menu button, and i am trying to change the color of the box's background but it appears the size of it (red) is larger than the margin (yellow), how can I change the size or what would be the attribute to change? I tried changing the size attribute in CSS but it is not working.

.menu-item .check-box > .box {
    -fx-background-color: red;
    -fx-border-color: yellow;
}

Example Link

2
  • Hi SergioM, have you checked the JavaFX CSS reference Guide? Commented Feb 28, 2017 at 0:06
  • Hi Travis, Yes I have gone through it without any luck. Commented Mar 1, 2017 at 19:56

1 Answer 1

0

I had the same problem and solved it by using

-fx-background-insets: 0 0 1 0;

Found it in a similar question here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.