Hi
How to set font size , width etc for all dropdowns . All dropdowns are in tfoot.
C#
Select Book
Select SessionThanks
Abhishek ChadhaRank #402 · 6.2K reputationPosted Apr 1, 2023, 2:55 PM EDT
Put a class to listItem like -
and give a font property to this class like -
.drpdwnfont{ font-size: 14px; }Ramco RamcoRank #462 · 5.4K reputationPosted Apr 1, 2023, 11:34 PM EDT
Hi
If already given class="form-control" , then what should be done
Thanks
Pasang TamangRank #449 · 5.6K reputationPosted Apr 3, 2023, 12:40 AM EDT
Hi,
You can add another class for your dropdown. And write CSS for that class. Please check below example.
Regards,
Pasang
Ramco RamcoRank #462 · 5.4K reputationPosted Apr 3, 2023, 1:09 AM EDT
Hi Pasand
It is working but the shape should appear like which i have shown in square or like where date is shown
Image attached
/forums/uploadfile/f61a1a/04032023050400AM/Format.png
Thanks
Pasang TamangRank #449 · 5.6K reputationPosted Apr 3, 2023, 1:18 AM EDT
Hi Ramco,
If you are using Boostrap then you should get desired design already. Please check this link as a reference https://getbootstrap.com/docs/4.1/components/forms/#sizing.
Regards,
Pasang
Ramco RamcoRank #462 · 5.4K reputationPosted Apr 3, 2023, 1:56 AM EDT
Hi Pasand
Issue i am facing is that it shows list on right side. When i select value does not shows up in dropdown . I ant that it should be left aligned. I have attached image also.
Thanks
Tuhin PaulRank #7 · 71.9K reputationPosted Apr 3, 2023, 2:16 PM EDT
Select Session .dropdown-control{ font-size: 16px; color: green; text-align: left; } .dropdown-control option{ text-align: left; }Along with the existing CSS rules that set the font size and color of the DropDownList control, I have added two new rules to align the text of the dropdown values to the left. The first rule applies the text alignment to the DropDownList control itself, while the second rule applies it to each of its option elements.
Tuhin PaulRank #7 · 71.9K reputationPosted Apr 3, 2023, 2:17 PM EDT
To set font size and width for all dropdowns in the table footer (
), you can use CSS to target all dropdowns in the footer and apply the desired styles.Select Book Select Session tfoot .form-control { font-size: 14px; width: 200px; }we're targeting all elements with the class form-control within the
tag using the tfoot .form-control selector. Then, we're setting the font-size and width properties to 14px and 200px, respectively.Ramco RamcoRank #462 · 5.4K reputationPosted Apr 3, 2023, 11:21 PM EDT
Hi Tuhi
Still not working. IN dropdown it is showing the same way as image attached
Thanks
Deepak RawatRank #646 · 3.7K reputationPosted Apr 14, 2023, 10:19 AM EDT
tfoot select { font-size: 14px; width: 150px; /* add other properties as needed */ }Hi try this method may it can help you.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts