# (Squarespace) Show Images in Gallery Block in same line

**URL:** <https://community.elfsight.com/t/squarespace-show-images-in-gallery-block-in-same-line/103928>\
**Category:** Platform Tips\
**Tags:** squarespace\
**Created:** [February 27, 2025, 7:24am UTC](https://community.elfsight.com/t/squarespace-show-images-in-gallery-block-in-same-line/103928 "2025-02-27T07:24:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuanphan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/tuanphan/32/3165_2.png) [@tuanphan](https://community.elfsight.com/u/tuanphan)\
**Post date:** [February 27, 2025, 7:24am UTC](https://community.elfsight.com/t/squarespace-show-images-in-gallery-block-in-same-line/103928/1 "2025-02-27T07:24:04Z")

</div>

To make Images in Gallery Block Grid in the Same Line, you can follow these.

**#1.** First, [find Gallery Block ID](https://community.elfsight.com/t/how-to-find-id-in-squarespace/65340).

In my example, it is: #block-yui\_3\_17\_2\_1\_1740445546004\_4569

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/5/4/541ac96bdc113e519ee3f5a807df9c9d289f5099.png)

**#2**. Next, use this code to Custom CSS  
If code doesn’t work, you can comment below, [message](https://community.elfsight.com/u/tuanphan/) or [send me an email](https://community.elfsight.com/u/tuanphan/summary).

```auto
#block-yui_3_17_2_1_1740445546004_4569 {
.margin-wrapper {
    margin: 0px !important;
}
.slide {
    width: 12.5% !important;
    clear: none !important;
}}

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/c/5/c53e79012e1762f62667fb30860e9f09debe9dab.png)

Note: If Gallery has 8 images, use 12.5% in the code. If the Gallery has 20 images, use 5%. If the Gallery has 10 images, use 10%.

Result

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/4/8/48b2a0c4c61ab7b4d2d43d93b5d6017e08e24668.png)

**#3.** If you want to apply this on mobile only, use this CSS code.

```auto
@media screen and (max-width:767px) {
#block-yui_3_17_2_1_1740445546004_4569 {
.margin-wrapper {
margin: 0px !important;
}
.slide {
width: 12.5% !important;
clear: none !important;
}}}

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/a/d/ad5aeeeca5837747324618a55748a67ca7b46337.png)

Result

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/d/5/d544e94f66c1d9a347f648621fca6e662c979a95.jpeg)

---

<div class="post-metadata">

**Author:** ![romano97002](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/romano97002/32/95751_2.png) [@romano97002](https://community.elfsight.com/u/romano97002)\
**Post date:** [February 28, 2025, 4:22pm UTC](https://community.elfsight.com/t/squarespace-show-images-in-gallery-block-in-same-line/103928/2 "2025-02-28T16:22:05Z")

</div>

@tuanphan,

❤ ❤ ❤
