CSS Padding

Andy Till atill at mail.com
Mon Aug 27 11:12:18 PDT 2012


I am trying to increase the top and bottom spacing on button and combo box type components using CSS, assuming that the same font and font size is used then I would like the components to all be the same height. However, I have run into a couple of difficulties.

 Firstly, I can't find a way to pad combo box and choice components. The following CSS will size the combo box correctly but push down the selected cell text.

 .combo-box .list-cell {
 /* -fx-padding: 6 6 6 6; */
 }

 Padding around the arrow button doesn't seem to work either. Secondly, adding a graphic node to a button or menu button increases it's size by 2 pixels. Am I missing a property somewhere?

 The current CSS can be found at: https://github.com/JFXtras/jfxtras-styles/blob/master/src/brume/brume.css

 Many Thanks

 Andy


More information about the openjfx-dev mailing list