Frederick Posted November 24, 2023 Share Posted November 24, 2023 I am using the theme "uni_win11_polar_light". The space between the box and the caption in the TUniCheckBox is too small. How do I add a space between the box and the caption? I tried " Change" for the caption but it showed "nbspChange". For some reason, this same method works for a TUniRadioButton. -- Frederick (UniGUI Complete - Professional Edition 1.95.0.1576) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 24, 2023 Share Posted November 24, 2023 Hello, 30 minutes ago, Frederick said:   It would be correct to put ";" at the end: Quote Link to comment Share on other sites More sharing options...
Frederick Posted November 24, 2023 Author Share Posted November 24, 2023 It seems that Change does not work. Using & Change or & Change works. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 24, 2023 Share Posted November 24, 2023 Very good. Quote Link to comment Share on other sites More sharing options...
Thiago Moraes Posted November 28, 2023 Share Posted November 28, 2023 Instead of using " " for space, you can try using the "Padding" property in the CSS or styling options for your TUniCheckBox. Adjusting the padding should give you the space you need between the box and the caption. Quote Link to comment Share on other sites More sharing options...
Frederick Posted November 28, 2023 Author Share Posted November 28, 2023 Doesn't padding create space around the control rather than between the box and the caption? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 28, 2023 Share Posted November 28, 2023 30 minutes ago, Frederick said: Doesn't padding create space around the control rather than between the box and the caption? You can also use CSS globally for all elements. Quote Link to comment Share on other sites More sharing options...
Frederick Posted November 28, 2023 Author Share Posted November 28, 2023 Thanks. May I have the code to put in CustomCSS? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 29, 2023 Share Posted November 29, 2023 6 hours ago, Frederick said: Thanks. May I have the code to put in CustomCSS? Well, 1-Possible solution: Using the !important rule in CSS (but) is generally considered to be bad practice because it overrides all other styles, regardless of their specificity. .x-form-cb-label { padding-left: 22px !important; } 2-Possible solution: Using extra class. 2.1. LayoutConfig.Cls = customCB 2.2. .customCB .x-form-cb-label { padding-left: 22px; } ... Quote Link to comment Share on other sites More sharing options...
Thiago Moraes Posted November 29, 2023 Share Posted November 29, 2023 Instead of using " ", try using the "Margin" property if it's available for TUniCheckBox in your theme. You can increase the margin to create some space between the box and the caption. Quote Link to comment Share on other sites More sharing options...
Frederick Posted November 29, 2023 Author Share Posted November 29, 2023 9 hours ago, Sherzod said: Well, 1-Possible solution: Using the !important rule in CSS (but) is generally considered to be bad practice because it overrides all other styles, regardless of their specificity. .x-form-cb-label { padding-left: 22px !important; } 2-Possible solution: Using extra class. 2.1. LayoutConfig.Cls = customCB 2.2. .customCB .x-form-cb-label { padding-left: 22px; } ... Thanks. This is a better solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.