# Dropdown width grow to the size of the selected item?

**URL:** <https://forum.inductiveautomation.com/t/dropdown-width-grow-to-the-size-of-the-selected-item/96709>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 2, 2024, 1:36pm UTC](https://forum.inductiveautomation.com/t/dropdown-width-grow-to-the-size-of-the-selected-item/96709 "2024-10-02T13:36:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 2, 2024, 1:36pm UTC](https://forum.inductiveautomation.com/t/dropdown-width-grow-to-the-size-of-the-selected-item/96709/1 "2024-10-02T13:36:36Z")

</div>

can dropdown width grow to the size of the selected item when the dropdown is open ?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/88a7e401d97dbbc99df9408a5be4ae09981d4cbb.png)

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [October 2, 2024, 3:10pm UTC](https://forum.inductiveautomation.com/t/dropdown-width-grow-to-the-size-of-the-selected-item/96709/2 "2024-10-02T15:10:33Z")

</div>

I had trouble getting my dropdown to expand correctly so what I did in Perspective for a similar situation is change the **dropdownOptionStyle** property **whiteSpace** to **normal**. This causes the text to wrap around instead.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 2, 2024, 3:35pm UTC](https://forum.inductiveautomation.com/t/dropdown-width-grow-to-the-size-of-the-selected-item/96709/3 "2024-10-02T15:35:26Z")

</div>

Thanks for the tips !

---

<div class="post-metadata">

**Author:** ![Nathan\_Moore](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@Nathan\_Moore](https://forum.inductiveautomation.com/u/Nathan_Moore)\
**Post date:** [October 2, 2024, 4:00pm UTC](https://forum.inductiveautomation.com/t/dropdown-width-grow-to-the-size-of-the-selected-item/96709/4 "2024-10-02T16:00:39Z")

</div>

If you need the dropdown to remain the same size, but have options menu grow to the size of the option. You can add the following to your css stylesheet.

```python
.ia_dropdown__optionsModal {
	width: auto !important;
}

```
