I have the folowing slider:
But i have a problem with resizing it.
Right now its 1200 x 400, and when I resize the page the image width will resize fine. The problem is that the height stays 400px, but I want that the height also resizes relative to the width of the image when you view it on a smaller device.
How do I do that?
This is what you see on a phone:
The css for the image right now is:
max-width: 100%;
height: auto;
What I have tried is:
- Set the height to 33.3% (width - html,- bodyand- #containerset to- width: 100%)
- I tried differend settings with - vhand- vmbut did not work as I wanted it to
Btw:
I am using Bootstrap 4, so if there is a class in Bootstrap that can solve this would be perfect.
I also have a live version on https://jalinen.luukwuijster.io


 
     
    