Pure CSS Image Slider Using Only HTML & CSS

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 155

  • @leonelmessi3010
    @leonelmessi3010 5 месяцев назад +1

    very useful idea. for begineers who dont have good knowledge about js but wants their project to look cool

  • @aborgrio6446
    @aborgrio6446 4 года назад +7

    without using javascript u have make this very cool image slider, thanks bro

  • @jashanpreetsingh1875
    @jashanpreetsingh1875 Год назад +1

    very helpful.. was struck here for an hour
    thankuuuuuu so much

  • @Анастасия-ы2л5э
    @Анастасия-ы2л5э 10 месяцев назад +1

    Боже , огромное спасибо, сейчас учусь верстке и ваш ролик безумно помог!
    Сидела над этим сама часа три не меньше, в итоге благодаря вам вопрос решился за пару минут)

  • @ebostories8372
    @ebostories8372 2 года назад +4

    Loved it! Just started learning HTML+CSS and couldn't find any easy to follow tutorials

  • @bhavnanagar4589
    @bhavnanagar4589 3 года назад +7

    Very helpful, have seen so many tutorials but this one was very simple and elegant, thank you soo much

    • @Lama-Code
      @Lama-Code  3 года назад

      Thank you Bhavna Nagar

    • @DeOLite
      @DeOLite 2 года назад

      maybe you setted img not container 100%?

    • @kpujarao3601
      @kpujarao3601 Год назад

      Hi pls tell me what is use of transition tag

  • @anusham2689
    @anusham2689 2 года назад +1

    thank you so much....without u i never complete my task

  • @HHcz
    @HHcz Год назад +3

    I don't know how to put all of this into a container because it all gets messed up. Any help?

  • @gopichand3378
    @gopichand3378 3 года назад +2

    06:27 current viewing image circle should be white to differentiate from rest of the images.

  • @TiffenBusson
    @TiffenBusson 9 месяцев назад

    Hello, thank you for the video! I just wanted to know why do we have to put width:60% for the .slider? When I try in mine, there is a piece of the next picture visible, and the next pictures have pieces of the ones after them bigger and bigger each time.
    Thanks for the answer!

    • @Lama-Code
      @Lama-Code  9 месяцев назад

      Hi guys, it's better to have images of the same size to create a slider using only HTML and CSS. Otherwise I created another tutorial where I showed how to create an image slider easily using the Swiper library so I recommend you use an external library to create this kind of slider.
      check this :
      ruclips.net/video/_GDPi4P4m74/видео.html

    • @TiffenBusson
      @TiffenBusson 9 месяцев назад

      @@Lama-Code thank you for your answer, but I can assure you that my pictures are all the same size, both in height and width! So I wonder what the problem could be?

  • @maverickazarcon3581
    @maverickazarcon3581 Год назад

    asamualaykum thank you for your informative codees

  • @Shotbysimmons
    @Shotbysimmons 2 года назад

    Thank you for this video I had a problem with my images not loading from local system. I noticed you had your images saved in the same folder as your project, when I moved mine to the project folder they worked.

  • @jyotijadhav7532
    @jyotijadhav7532 2 года назад

    Thank u so much yar 🤗it was very helpful 🙌

  • @rasthaykutta4924
    @rasthaykutta4924 3 года назад +1

    Thank you so much, you made my web page assigment prettier!

    • @emmettroberto7195
      @emmettroberto7195 3 года назад

      I guess im asking randomly but does someone know a method to log back into an instagram account..?
      I somehow forgot my login password. I would appreciate any help you can offer me.

    • @tysondaxton3911
      @tysondaxton3911 3 года назад

      @Emmett Roberto instablaster =)

    • @emmettroberto7195
      @emmettroberto7195 3 года назад

      @Tyson Daxton I really appreciate your reply. I got to the site through google and I'm in the hacking process now.
      Seems to take quite some time so I will get back to you later with my results.

    • @emmettroberto7195
      @emmettroberto7195 3 года назад

      @Tyson Daxton it did the trick and I now got access to my account again. I'm so happy:D
      Thank you so much you saved my account !

    • @tysondaxton3911
      @tysondaxton3911 3 года назад

      @Emmett Roberto glad I could help xD

  • @panslawista
    @panslawista 3 года назад +1

    Hi can you help me? I did this and everything works except my images in the slider overlap eachother and when they move part of them move too far to fit in the slider or not far enough so you can see part of one image and part of another. I did everything exactly the same as you except I used 6 images and not for. Could you tell me what I need to change in the code so these six images slide perfectly into the slider showing only one image?

    • @Lama-Code
      @Lama-Code  3 года назад

      try to set the images width to 100% of their container .

    • @panslawista
      @panslawista 3 года назад

      @@Lama-Code they are

    • @rinkikhandal2896
      @rinkikhandal2896 Год назад

      @@panslawista same problem I am facing, I resized the images still it's not working

    • @lollig_gamer6899
      @lollig_gamer6899 14 дней назад

      I had the same problem and ended up making the container size smaller to 30% and it fixed the issue. May have to play with different container sizes depending on your photos. I belief the photos used are very large. I was limited in how large the photos I could use as it is for a school assignment and the hosting platform assigned has limitations on file size and thus I had to use much smaller photos and ended up with your same problem. Resizing the container width fixed the issue for me.

  • @jaymagalong3112
    @jaymagalong3112 Месяц назад

    The picture I need it fullscreen is there a way?

  • @mrsakthiofficial
    @mrsakthiofficial 2 года назад +1

    Bro one help auto mattic silder scroll transmission I can be use its is passible bro

    • @Lama-Code
      @Lama-Code  2 года назад

      Yes, u can make it automatic using css animations

  • @comicghozt
    @comicghozt 11 месяцев назад +1

    Hello. Very nice tutorial.
    How to make the selected image stay checked on the dots?

    • @Lama-Code
      @Lama-Code  11 месяцев назад +1

      Use :checked +
      I did that on this video : ruclips.net/video/QE1cugQggjk/видео.htmlsi=7fsHI5x5n5s2v5tC

    • @comicghozt
      @comicghozt 11 месяцев назад

      Thank you friend.

  • @Lama-Code
    @Lama-Code  4 месяца назад

    Subscribefor more videos : www.youtube.com/@Lama-Code

  • @jorymonika94
    @jorymonika94 4 года назад

    Nice , I love this tricks

  • @WajidCodes
    @WajidCodes Год назад

    I am pakistani
    Thanks brother
    😍😍😍

  • @vinaypatil6622
    @vinaypatil6622 2 года назад +1

    my first image is aligned properly but other 3 are too much stretched why??

    • @Lama-Code
      @Lama-Code  2 года назад +1

      Slide images should have the same size

    • @vish_9409
      @vish_9409 Год назад +1

      Always use png extension while using any pics ...it retains the original size of the pic

  • @jaymagalong3112
    @jaymagalong3112 Месяц назад

    May I ask can you fullscreen that

  • @KultuFact
    @KultuFact 2 года назад +1

    i downloaded your file from the link in the description and i have linked them all properly but there is an issue. The image seven at 100% width don't contain the full space of the images div. Pleas confirm for by yourself and reply me. i really like your videos.

    • @Lama-Code
      @Lama-Code  2 года назад

      it’s normal,if u have a small image,it will not cover all div .
      So u should resize you image .

  • @the_artful_touch
    @the_artful_touch Год назад

    tutorial is very helpful.. just one query, my slide contains grid of images, it is working fine with this code except for first slide where it shows all 3 slides combine.. can you please tell me the missing part?

    • @Lama-Code
      @Lama-Code  9 месяцев назад

      it's better to have images of the same size.

  • @antys_tech_cz
    @antys_tech_cz 2 года назад +1

    hi, nice tutorial, but i cant see my images, they are "under" all on website, how can i fix it?

    • @Lama-Code
      @Lama-Code  2 года назад

      Check the description section and try to download source code of this slider.
      Try to resize ur images, it’s recommended to have the same size.

  • @stefanwebdev1803
    @stefanwebdev1803 2 года назад

    How did you made that rgb (25,12,41) color ? It was not appearing at me ....

    • @Lama-Code
      @Lama-Code  2 года назад

      you can use this hex color instead of rgb color : #190c29

  • @enji5942
    @enji5942 2 года назад

    i need help, i used 8 images with 16:9 sizes and whenever i try to hover it in the middle the others are not sliding

    • @Lama-Code
      @Lama-Code  2 года назад

      in this video we have 4 images in your case u have 8 so u need to add more radio buttons and labels and styles them . This way u can fix this issue

  • @sanjidasanjida3123
    @sanjidasanjida3123 3 года назад

    Thanks for sharing.. Wow

  • @jakubgabzdyl2695
    @jakubgabzdyl2695 2 года назад

    Hey bro, i got a problem, i have 4 pictures like u and the second one is placed on the first one, there are just 2 images on one slide, on second slide there are three images and theres part of them cut, idk what to do, any tips? i copied the code from u too to see, if its only my mistake in code or something but it does the same.

    • @Lama-Code
      @Lama-Code  2 года назад

      Try to use images with the same size or resize them with CSS.

  • @aleluya_bokita
    @aleluya_bokita 2 года назад

    Thanks! Me quedo genial!

  • @himprittigga8207
    @himprittigga8207 2 года назад

    So very Helpful....!!! I was searching for how to use sliders in html, in vs code...and i found this- Simple and Best.... 👍😊

    • @kpujarao3601
      @kpujarao3601 Год назад

      Hi could u pls tell me what is the use of transition tag here.

  • @zgallerie787
    @zgallerie787 3 года назад

    Your videos is good kindly also guide every tag , why you use

  • @futurdigital
    @futurdigital 3 года назад +2

    Très intéressant, bravo Mohamed merci pour le tuto ! 💪🏻

    • @Lama-Code
      @Lama-Code  3 года назад

      Merci beaucoup Futur Digital.

  • @ehoy4895
    @ehoy4895 Год назад +1

    TYSM

  • @JonnakutiKiranBabuBVCE
    @JonnakutiKiranBabuBVCE Год назад

    super bro

  • @aadityarajpandey5875
    @aadityarajpandey5875 2 года назад +1

    what was the dimensions of your images

    • @Lama-Code
      @Lama-Code  2 года назад +1

      They have different sizes but I resized them with Css .

    • @aadityarajpandey5875
      @aadityarajpandey5875 2 года назад +1

      @@Lama-Code Thanks 👍

  • @CS27ZO
    @CS27ZO Год назад

    Does this translate well onto smaller devices like phones?

    • @Lama-Code
      @Lama-Code  Год назад

      u can make this responsive using css media queries

  • @ReubertPalabrica
    @ReubertPalabrica Год назад

    I know you might not see this comment but may I ask what were the resolutions of the images you used in the video?

    • @Lama-Code
      @Lama-Code  Год назад

      Hi, you find them on GitHub repository.
      The is in the description section

  • @caiolins2911
    @caiolins2911 3 года назад +2

    muito obrigado amigo, saudações brasileiras!

  • @thomasalexandre1014
    @thomasalexandre1014 2 года назад

    Hello what theme do you use please ?

    • @Lama-Code
      @Lama-Code  2 года назад

      Hello Thomas 🙌 : I am using monokai vibrant theme that I customised with some colors .
      You can find the steps to get the same theme I have in this respository on my github account : github.com/m-mourouh/My-Custom-Theme

  • @window-creative
    @window-creative Год назад

    Akhuya bayna fik maghribi 🌝

  • @udayprakashharsh2805
    @udayprakashharsh2805 2 года назад +1

    Great tutorial!
    appreciate you sharing files too :yougotthid;

  • @JoeGelman
    @JoeGelman 3 года назад

    How would you make the circle that's clicked be filled in?

    • @Lama-Code
      @Lama-Code  3 года назад

      every circle is linked with a radio button , so when you click on a circle the associated radio button gets checked, and this will allow you to fill in circle using background-color property .
      (e.g : #btn:checked ~ .circle{background-color:#FFFFFF ;} ) , here btn represents the radio button and circle represents the dot. I hope this helps you .

  • @ganesan.r5430
    @ganesan.r5430 3 года назад +1

    why the tilde ~ 👈 what it does or why it is used .

    • @ganesan.r5430
      @ganesan.r5430 3 года назад

      @MOHAMED MOUROUH ok bro thank you

  • @zaheerkundgol8123
    @zaheerkundgol8123 Год назад

    please, tell me how to keep the color of white when the user has pressed a radio?

    • @Lama-Code
      @Lama-Code  Год назад

      Hi Zaher, for this you can check when the radio button is checked and then set the background to white to the corresponding dot .
      Something like this : .rdBtn:checked ~ label : { background: white }

    • @zaheerkundgol8123
      @zaheerkundgol8123 Год назад

      @@Lama-Code I suffered the whole day but, I couldn't find anyway to keep it white. Are you sure if this is going to work?

    • @zaheerkundgol8123
      @zaheerkundgol8123 Год назад

      Can you tell me is this the exact code that I have to paste here?

  • @marieluice2550
    @marieluice2550 4 года назад

    a very good slider

  • @ledompteurdemoule3081
    @ledompteurdemoule3081 3 года назад

    Nice 😍

  • @danielroman1484
    @danielroman1484 2 года назад

    My dots don’t come up in the center any tips?

    • @Lama-Code
      @Lama-Code  2 года назад

      You can center them using margin : npx auto , or with flexbox

  • @telmocosta5745
    @telmocosta5745 3 года назад +1

    Great job, its just awesome what u can do with only html/css!!! I have 20 images, so i wanted to make it slide 4 images each time, im trying since yesterday to figure it out, but i cant manage how to do it, can u give me some help?

    • @Lama-Code
      @Lama-Code  3 года назад +1

      U can add them all in HTML and control them with radio buttons and css

    • @telmocosta5745
      @telmocosta5745 3 года назад

      @@Lama-Code thats what i did, the only problem is that when i press the 3rd/4th/5th/6h radio button the pictures start zooming and it dont show all the 4 pictures i want, and i followed ur logic (0 -100% -200% -300% -400% -500%)

  • @SharifNoble
    @SharifNoble 8 месяцев назад

    can it be turned to auto slide?

    • @Lama-Code
      @Lama-Code  8 месяцев назад

      You can use css animations for that.

  • @amanagarwal2024
    @amanagarwal2024 4 года назад +2

    Can u pls share the code for this ? It's amazing

    • @Lama-Code
      @Lama-Code  4 года назад +1

      You can find the source code in the description section

  • @estellenysso1026
    @estellenysso1026 4 года назад +1

    thanks for this video! on my side the images do not slide

  • @wavyw997
    @wavyw997 4 года назад

    Thanks for the source code I managed to edit it out. Is it possibly that a video could be contributed in the slider ?

    • @Lama-Code
      @Lama-Code  4 года назад

      thank you for your comment ,
      yes of course you can add a video in the slider

    • @wavyw997
      @wavyw997 4 года назад

      @@Lama-Code is there a video displaying this ?

    • @wavyw997
      @wavyw997 4 года назад

      ??

    • @wavyw997
      @wavyw997 4 года назад

      If it's a separate video please forward me a link.

    • @Lama-Code
      @Lama-Code  4 года назад

      ​@@wavyw997 To display your video in the slider ,I think you should add it as you do with images , but it's a little bit different , (Sorry I have no video that shows how to make a video slider
      )

  • @soumyanandan1567
    @soumyanandan1567 3 года назад

    Thank you so much, but I have a question
    My photos are in potrait mode so can you show me the code of some potrait photos slider
    Thanks btw

    • @Lama-Code
      @Lama-Code  3 года назад

      You just have to change the width of the images container

    • @soumyanandan1567
      @soumyanandan1567 3 года назад

      Thanksss it is working now

  • @jackblacks4176
    @jackblacks4176 Год назад

    How do we make it slide automatically please?

    • @Lama-Code
      @Lama-Code  Год назад

      You can use CSS animation for that.

  • @outsidesympathy
    @outsidesympathy 2 года назад

    I am learning so..What is ..checked ~ m1,i don't know, can you explain me?

    • @Lama-Code
      @Lama-Code  2 года назад +1

      (~) This basically means that it will select all siblings after a selector.

  • @TheGuyWithWifi
    @TheGuyWithWifi 2 года назад

    3:20 mine looks nothing like yours

    • @Lama-Code
      @Lama-Code  2 года назад

      You can download the source code of this hamburger menu from the link in the description section.

  • @samoli02
    @samoli02 3 года назад

    Why the picture is gone after following all the steps

    • @Lama-Code
      @Lama-Code  3 года назад

      Download the code of this project then try to see where u have a problem .
      You can find the link to the source code in the description section,

  • @lynxlecher9547
    @lynxlecher9547 3 года назад

    This doesn't work either. All I want is a simple left and right gallery and all I find is these sliders that don't work.

    • @Lama-Code
      @Lama-Code  3 года назад +1

      You can download this project from the source code in the description section .

    • @lynxlecher9547
      @lynxlecher9547 3 года назад

      @@Lama-Code I decided to do it another way but thank you for letting me know. And sorry for my comment, I was frustrated.

  • @haroonrasithu8269
    @haroonrasithu8269 2 месяца назад

    How to set this automatic ?

    • @Lama-Code
      @Lama-Code  2 месяца назад +1

      You can use animation, but it is old school , use swipes.js instead

    • @Lama-Code
      @Lama-Code  2 месяца назад +1

      Creative Image Slider Using HTML, CSS & Javascript | SwiperJS Tutorial
      ruclips.net/video/_GDPi4P4m74/видео.html

  • @Smiley100k
    @Smiley100k 2 года назад

    How to center the whole slider?

    • @Lama-Code
      @Lama-Code  2 года назад

      Hi @Smiley,
      For this you can put your slider inside a container and then center it using either flex box or any other way like (grid system, position …).
      Enjoy 😉.

  • @antonis_mylonas
    @antonis_mylonas 3 года назад +1

    photos must be in same size:

    • @Lama-Code
      @Lama-Code  3 года назад

      Yeah , if they havn't the same size u can resize them with css

  • @reulacto7109
    @reulacto7109 2 года назад

    your code isn't working !! with other images !!
    if you are free please reply to my comment.

    • @Lama-Code
      @Lama-Code  2 года назад

      u can resize your images with css

  • @kowsalya2740
    @kowsalya2740 3 года назад

    Bro, slider is not visible for full screen, what can i do, help me sir

    • @Lama-Code
      @Lama-Code  3 года назад +1

      change the width and height of images

  • @adepuravali2918
    @adepuravali2918 7 месяцев назад

    adi cheste vasta ledu naku

  • @liamaiken1782
    @liamaiken1782 Год назад

    helpful but, something not understanding

  • @biaali4590
    @biaali4590 4 года назад

    ❤️

  • @hananela1673
    @hananela1673 3 года назад

    جميل لكن الكود ماعم ينضبط

    • @Lama-Code
      @Lama-Code  3 года назад

      ممكن تحميل كود هذا image-slider من Github , الرابط في صندوق الوصف.

  • @tonytony-fc6gq
    @tonytony-fc6gq Год назад

    A WASTE OF TIME, this does not work, all 4 images are showing

    • @Lama-Code
      @Lama-Code  Год назад

      You can download the code of this image slider from the GitHub repo in the description section. Or you can download this one and replace images (github.com/m-mourouh/swiper-image-slider).

  • @harikaadam5411
    @harikaadam5411 Год назад

    Is it just me or this shit not working
    Please help😢

    • @Lama-Code
      @Lama-Code  Год назад

      Hi, you can get the source code of this menu from the link in the description section

  • @tirveersingh6138
    @tirveersingh6138 4 года назад

    Only Time pass

  • @MuhammadBilal-k4r3r
    @MuhammadBilal-k4r3r 2 месяца назад

    urdu me he bol lay english ki samaj nhi arhi ap ki

  • @dineshvarmaproductions
    @dineshvarmaproductions Год назад

    Mat kar bhai aesa muh se bolna seekh