# Center widget on the page

**URL:** <https://community.elfsight.com/t/center-widget-on-the-page/23380>\
**Category:** Event Calendar\
**Created:** [October 24, 2023, 9:52am UTC](https://community.elfsight.com/t/center-widget-on-the-page/23380 "2023-10-24T09:52:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helga](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/helga/32/1155_2.png) [@Helga](https://community.elfsight.com/u/Helga)\
**Post date:** [October 24, 2023, 9:52am UTC](https://community.elfsight.com/t/center-widget-on-the-page/23380/1 "2023-10-24T09:52:52Z")

</div>

Add the code below to Custom CSS field on the Style tab of your [Event Calendar](https://elfsight.com/event-calendar-widget/) widget’s settings:

```auto
.global-styles,
[class^='RootLayout__Component-sc'] {
  margin: 0 auto;
}

```

  

Guys, if this code was helpful to you, please drop a line in the comments. Your feedback helps us improve our services and provide better solutions 🙂

---

<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:** [February 19, 2024, 3:19pm UTC](https://community.elfsight.com/t/center-widget-on-the-page/23380/2 "2024-02-19T15:19:32Z")

</div>

2 posts were split to a new topic: [Event Calendar alignment](https://community.elfsight.com/t/event-calendar-alignment/41411)
