I am just getting started with web design and I can’t find out where the problem is. The slider is a plugin that I took from this site. I want to display pictures, but they simply don’t appear. I set them as a background-image for the <li>'s and set them to a width of 100% and a special height. I think it is the only way to align them and to make the slider responsive.
I put the images as background-images, so you can see them in the slider.css file. I just changed the doctype thing, thanks.
I can’t fix the problem by putting the background-image on the box class.
EDIT: I just changed the website by putting the background-images on the box1 class, set the width to 100% and the height to auto. No solution found yet.
I tried it in the beginning, but I thought it is not possible to center them horizontally. Margin auto on both sides doesn’t work. Another point is, that the background-image and the background-size: cover would make it totally responsive. I don’t think that the img solution will keep that responsiveness.
There must be a way without going into the jQuery. On the glide.js website the images are aligned as well, but I can’t figure out why. Glide.js is a responsive one which is hard to find.
If you want to stick with Glide, at least make sure you’ve let it up the way it’s set up on the demo site. In their code, they have a different class on each LI, which then feeds in a different background image each time.
Alright. I just found out that I forgot to set the width and height of the li, thats why no background appeared. I knew there was a way with the background-image. Thank you for supporting and helping me!