25
Views
8
Comments
Solved
Dropdown padding not working
Question
Application Type
Reactive
Platform Version
11.28.0 (Build 43201)

I have several dropdowns on a form where the value is wider than the widget.  It looks bad when the data overwrites the dropdown arrow. 

I have set padding using css, but it doesn't take.  If I try to change padding with the styles settings, the number immediately reverts back to zero no matter what I put in.

As you can see, the css and the padding settings don't match. Any idea why this is happening?

2025-02-21 07-07-34
Rishabh Tailor
Solution

Hi @Jeff Kest ,

You will have to give padding to one element in the dropdown as specified below.


you can write the CSS where dropdown is present in your stylesheet and use CSS specificity to apply the changes to a single dropdown too if you want. 

2024-05-22 06-12-56
Vignesh Prakash

Hi @Jeff Kest

Can you please try using important (!) in your CSS also it is not advisable to have inline CSS, 

if possible, can you please share the OML?

Thanks,
Vignesh Prakash.

2025-02-21 07-07-34
Rishabh Tailor
Solution

Hi @Jeff Kest ,

You will have to give padding to one element in the dropdown as specified below.


you can write the CSS where dropdown is present in your stylesheet and use CSS specificity to apply the changes to a single dropdown too if you want. 

2020-06-04 07-36-47
Ajay Dadhich

Hi Jeff Kest,

Can you please share the OML file for the same. I will check and tring to resolve this.

Thanks

UserImage.jpg
King Fizel

Hi Jeff,

You can reduce width of the dropdown if the text overlaps means, it will fix your problem. Image for your reference

 Thanks

2022-06-08 17-38-53
Lokesh Kumar Shakya

Hi @Jeff Kest ,

If possible could you please share the OML.

Thanks

UserImage.jpg
Jeff Kest

The database has private data so can't easily be shared without some effort to sanitize it. 

2022-12-30 09-46-57
Deepika Patel

Hi @Jeff Kest,

You can add the CSS, padding-right: 16px in the dropdown class.

If possible please share the OML.

Thanks!

2023-10-21 19-42-11
Tousif Khan
Champion

Hi @Jeff 

Instead of adding padding here just add a css and add a text ellipsis which will show something like

Smith.......
By using this it is a good experience for user so that user knows that there is something beyond it,

You can use this Css snippet


This has already been asked and there are pretty good solutions available already on Forums for it.

I am attaching some links here that will help you fix this.

I hope this will resolve your issue.
Also adding a sample in case you need a POC - 


Thanks
Best Regards
Tousif Khan 

TestApp_dropdown.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.