# Set widget width

**URL:** https://community.elfsight.com/t/set-widget-width/34513
**Category:** Weather
**Created:** [December 14, 2023, 7:03pm UTC](https://community.elfsight.com/t/set-widget-width/34513 "2023-12-14T19:03:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [December 14, 2023, 7:03pm UTC](https://community.elfsight.com/t/set-widget-width/34513/1 "2023-12-14T19:03:01Z")

</div>

Add this code to the Custom CSS field on the Style tab of your [Weather](https://elfsight.com/weather-widget/) widget’s settings:

```auto
.global-styles,
.eapp-weather-weather-component {
  max-width: 800px !important;
}

```

---

<div class="post-metadata">

### Author: ![Uncultured](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/uncultured/32/67482_2.png) [@Uncultured](https://community.elfsight.com/u/Uncultured)
#### Post date: [May 26, 2025, 11:34am UTC](https://community.elfsight.com/t/set-widget-width/34513/2 "2025-05-26T11:34:18Z")

</div>

Did this class change? This no longer seems to work.

---

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [May 26, 2025, 12:18pm UTC](https://community.elfsight.com/t/set-widget-width/34513/3 "2025-05-26T12:18:23Z")

</div>

Hi there, @Uncultured 👋

Thanks for bringing this to our attention!

The class is the same, but now the code requires `.global-styles,` at the beginning. I"ve updated the code here.

Please check it out and let me know how it works 😉

---

<div class="post-metadata">

### Author: ![Uncultured](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/uncultured/32/67482_2.png) [@Uncultured](https://community.elfsight.com/u/Uncultured)
#### Post date: [May 27, 2025, 8:38pm UTC](https://community.elfsight.com/t/set-widget-width/34513/4 "2025-05-27T20:38:01Z")

</div>

Worked great, thanks for the update!
