Hi
I want dropdown values left aligned. Image also attached. It is showing in right

Code
Select Book
Select Session
Thanks
Hi
I want dropdown values left aligned. Image also attached. It is showing in right

Select Book
Select Session
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Uday DodiyaRank #239 · 10.3K reputationPosted Apr 4, 2023, 2:59 AM EDT
you can apply style attribute and asign value for text-align, as per below
Ramco RamcoRank #462 · 5.4K reputationPosted Apr 4, 2023, 3:04 AM EDT
Hi Uday
I have tried this but not working
Thanks
Uday DodiyaRank #239 · 10.3K reputationPosted Apr 4, 2023, 3:25 AM EDT
try the dir attribute on the select element to "ltr"
Sachin SinghRank #66 · 26.2K reputationPosted Apr 4, 2023, 4:58 AM EDT
test this
Deepak RawatRank #646 · 3.7K reputationPosted Apr 25, 2023, 8:18 AM EDT
you can use the CSS
text-alignproperty on the dropdown options Here's an example:select option { text-align: left; }the
select optionselector targets all the options within the dropdown list, and applies thetext-align: leftproperty to left-align the text within the options.Naimish MakwanaRank #324 · 7.7K reputationPosted Apr 25, 2023, 12:03 PM EDT
Try this: