# Change size of Pins

**URL:** <https://community.elfsight.com/t/change-size-of-pins/28508>\
**Category:** Customization\
**Tags:** pinterest-feed\
**Created:** [December 1, 2023, 8:41pm UTC](https://community.elfsight.com/t/change-size-of-pins/28508 "2023-12-01T20:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Marchbank](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/andrew_marchbank/32/12679_2.png) [@Andrew\_Marchbank](https://community.elfsight.com/u/Andrew_Marchbank)\
**Post date:** [December 1, 2023, 8:41pm UTC](https://community.elfsight.com/t/change-size-of-pins/28508/1 "2023-12-01T20:41:48Z")

</div>

Change size of Pins

---

<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 4, 2023, 1:16pm UTC](https://community.elfsight.com/t/change-size-of-pins/28508/2 "2023-12-04T13:16:11Z")

</div>

Hi there @Andrew_Marchbank and welcome aboard 👋

The size of pins depends on their number in the feed. Unfortunately, there is no option to set the number of columns in the widget’s configurator. However, our devs came up with a custom script for you:

```auto
<script>
const MAX_WIDTH_PIN = 300;

window.addEventListener("DOMContentLoaded", () => {
  const style = document.createElement("style");
  document.head.appendChild(style);

  const resizeObserver = new ResizeObserver(([{ contentRect }]) => {
    const { width } = contentRect;

    const columns = Math.floor(width / MAX_WIDTH_PIN);

    style.innerHTML = `
        .eapps-pinterest-feed .eapps-pinterest-feed-pin-container {
            max-width: calc(100% / ${columns}) !important;
        }
    `;
  });

  resizeObserver.observe(document.body);
});
</script>

```

You need to add this code right after your widget’s installation code. This script will control the changes of the browser window and adjust the needed number of columns.

In the variable `MAX_WIDTH_PIN`, we specify the maximum width of the pin block. If fewer columns and a larger image are needed, increase this value.

Check it out and let me know if it worked for you 🙂
