# 🎞️ 1. How to Create an Auto-Play Slideshow

**URL:** https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271
**Category:** Community Resources
**Tags:** custom-css, tutorial, custom-code
**Created:** [May 11, 2024, 7:35am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271 "2024-05-11T07:35:37Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 11, 2024, 9:35am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/21 "2024-05-11T09:35:23Z")

</div>

Sorry, I forgot to inform you, if you use a custom collection, the “image appear” column is no longer needed. This is because of the nature of the collection component, which is a list.

 ![Screenshot 2024-05-11 at 16.32.51](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/a/fa3511dbf247daa4e20d1247e89279997daacbd0.png)

Also, you might not be fetching images based on the query result, which results in an array.

> [@Himaladin](#):
>
> ![Screenshot 2024-05-11 at 14.43.19](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/d/3de6516cde9af29d63121974cb662b9dff696b56.png)
> 
> Screenshot 2024-05-11 at 14.43.19702×540 19.8 KB

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 11, 2024, 9:37am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/22 "2024-05-11T09:37:53Z")

</div>

ok. It works perfectly now! 😍

… now to test the actions.

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 11, 2024, 9:42am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/23 "2024-05-11T09:42:11Z")

</div>

This is a lovely workflow @Himaladin 👏 👏

The top one is the custom collection and the bottom is the standard collection using cards. Both work well.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/3/539fdd28b9c33ac93038882f2a5bcc58e5feb831.jpeg)

EDIT\*\*\* @Himaladin

ok, thanks. I fixed the query column so it’s no longer an array. 👍

I have a couple aesthetic questions.  
Is there a way to make the custom collection show an image in the background?  
Also, is there a way to play with or remove the padding to create a similar effect to my gifs in a normal container? (see below - upper image is our automatic slideshow and the bottom image is the gif)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/b/2b403aadfbbf5de643fe9b456b1030098d2bad45.jpeg)

On mobile, I put my gif in a title component to get it to look like that… and on larger screens it shows a background image to fill the space like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/2889836e8bf7fade38e5605ec11b620a543797db.jpeg)

EDIT\*\*\* @Himaladin

I think I got it… Instead of the custom container, I did another query and lookup column on my home page and pointed them to my Images Table. With that, I could use the original container with same title component and swap the gif with the new images instead. So that took care of the background image and fit problem -the gif can be perfectly replaced!  
The only issue now is that I can’t add actions to title components, lol… So i may have to try to use a regular image component with some CSS to mimic the fit of the title component… 👀

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 11, 2024, 10:46pm UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/24 "2024-05-11T22:46:10Z")

</div>

@Sekayi_Liburd, Do you mean you want to remove the padding for the mobile view (full width)?

> [@Sekayi\_Liburd](#):
>
> Is there a way to make the custom collection show an image in the background?

 ![Screenshot 2024-05-12 at 05.47.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/ef900c2e34382e7effa0fc60825190a2fa97ce88.jpeg)

Could you be using a 1:1 container + card collection and your logo here?

 ![Screenshot 2024-05-12 at 05.40.59](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/1/f12ba2d4cdaf3ca354aa9ea3f9f124b485c55d24.jpeg)

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 11, 2024, 11:45pm UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/25 "2024-05-11T23:45:50Z")

</div>

Yes, I meant appearing full width on the mobile view like in my image.

> [@Himaladin](#):
>
> Could you be using a 1:1 container + card collection and your logo here?
> 
> ![Screenshot 2024-05-12 at 05.40.59](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/1/f12ba2d4cdaf3ca354aa9ea3f9f124b485c55d24.jpeg)

Yes, this can work. How can you get your logo on the card? CSS?

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 1:45am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/26 "2024-05-12T01:45:11Z")

</div>

> [@Sekayi\_Liburd](#):
>
> Yes, I meant appearing full width on the mobile view like in my image.

Can you provide a screenshot of the component you are using or need to widen?

For the logo, you can use an image component, but it would be more flexible with HTML.

![Screenshot 2024-05-12 at 08.40.44](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/f/4fcdd09eba47416d59e0eea8799ea716b69d4076.png)

```auto
<img src="https://cdn.freebiesupply.com/images/large/2x/google-logo-transparent.png" alt="Description of the image" style="height:80px; display: block; margin: 0 auto;">

```

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 1:49am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/27 "2024-05-12T01:49:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/1/51113a7d1a86856429bea218d5562cabcc0a2b98.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/0/1097dfe6ae38b9bd92f1a736287306073d50b08d.png)

the settings are pretty limited with this component.

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 1:53am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/28 "2024-05-12T01:53:50Z")

</div>

No, I mean, do you still want to use a clickable slideshow, which won’t be achievable if using the title component.  
Show me the layout you’re expecting.

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 1:56am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/29 "2024-05-12T01:56:45Z")

</div>

It’s ok. I will use the Image component and adjust the design instead. Thanks.  
It’s MUCH better to have it clickable!

@Himaladin  
If the image component can reach to these edges, it will be perfect. If not, it’s ok. The users will get used to the change in appearance.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/4/d4d8ad01f78d07f77d23867d4fae8ff8370583a4.jpeg)

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 2:02am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/30 "2024-05-12T02:02:28Z")

</div>

Your point is that the image reaches the edge and is clickable, right?

Give me a moment. This requires adding CSS.

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 2:03am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/31 "2024-05-12T02:03:53Z")

</div>

yes please.

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 3:17am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/32 "2024-05-12T03:17:36Z")

</div>

Before you get too close to the finish line… can we blend this into what you started working on and create a super workflow?? Looks like it includes some image fit coding too.

> **[CSS Library](https://css-library.glide.page/dl/library/s/8836b3/r/DezBhyGpRrWsrGxntyq-tA)**

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 3:44am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/33 "2024-05-12T03:44:38Z")

</div>

Did you create different components for mobile and desktop based on device info?

This part is not yet in the library. It requires handling in the nav-bar and responsiveness across different devices.

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 3:50am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/34 "2024-05-12T03:50:55Z")

</div>

yes. I used visibility settings according to screen width (less than 500 vs greater than or equal to 500).

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 3:57am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/35 "2024-05-12T03:57:10Z")

</div>

If so, I don’t need to set the responsiveness anymore. Please try the following code, and let me know if anything is not right.

Container’s class name: slide-Show

```auto
/*Hide Navbar*/
[data-testid="wire-container"]{
background: transparent !important;
padding:0 !important;
}

/*Container padding*/
.mobile-layer .slide-Show > div > div > div > div {
padding:0 !important;
width: 100%;
margin-top:-15px;
}
/*Can delete*/
.mobile-layer .slide-Show {
background: transparent !important;
padding:0;
}
.mobile-layer .slide-Show [data-testid="card-image"]{
height:300px;
}
.slide-Show [data-testid="card-image"] img{
border-radius:0;
}

```

> [@Himaladin](#):
>
> ![Screenshot 2024-05-12 at 08.40.44](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/f/4fcdd09eba47416d59e0eea8799ea716b69d4076.png)

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 4:19am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/36 "2024-05-12T04:19:09Z")

</div>

hmm… it’s tiny but it could be my fault.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/0/101709b5a674336f560084cc8d50794182a76123.jpeg)

I added your class to the container but I put your html in a template so I could swap in my images. Don’t know if that’s the reason the image is so small.

Some background (in case it’s relevant), the editor detects that I’m using a screen width of 1920.

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 4:22am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/37 "2024-05-12T04:22:23Z")

</div>

Is this a richtext component? If yes, you need to set its height and width.

 ![Screenshot 2024-05-12 at 11.23.15](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/5/d50ae2b9fb743933261554c2b299728d1c3b3c1b.jpeg)

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 4:31am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/38 "2024-05-12T04:31:16Z")

</div>

ok. I set the width to 100% and height to auto. It’s better but still not full like yours.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/7/2766db1aaf2449ef2f8ce1a47b2a32900e859367.jpeg)

btw, is that you in the picture? 👋

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [May 12, 2024, 4:33am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/39 "2024-05-12T04:33:40Z")

</div>

Is your component placed on the top layer?

![Screenshot 2024-05-12 at 11.35.30](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/9/496ce8b031ee0dea7dc60c111700dbc27aeae602.png)

> [@Sekayi\_Liburd](#):
>
> btw, is that you in the picture? 👋

You can use it.

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [May 12, 2024, 4:34am UTC](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271/40 "2024-05-12T04:34:49Z")

</div>

umm… how do I know if it’s on top?

[Previous page](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271.md?page=1)

[Next page](https://community.glideapps.com/t/1-how-to-create-an-auto-play-slideshow/73271.md?page=3)
