I’d like to align a carousel with the left side of a container and have the right side stretch to the edge using the remaining space. Please see the attachment below. Thank you.
<main>
<div class="wrapper">
<p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla rerum voluptatum ex, dolores reiciendis praesentium, assumenda nam ab tenetur nesciunt fugiat molestias totam quas vel eos debitis amet nihil. Asperiores?
</p>
<div class="gallery">
<div class="item">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Sed, id. Aut nulla ab vero corporis cupiditate voluptatem fugiat, deleniti dolores assumenda perferendis facilis delectus officia! Rem maxime repellat quod sunt?
</div>
<div class="item">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Sed, id. Aut nulla ab vero corporis cupiditate voluptatem fugiat, deleniti dolores assumenda perferendis facilis delectus officia! Rem maxime repellat quod sunt?
</div>
<div class="item">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Sed, id. Aut nulla ab vero corporis cupiditate voluptatem fugiat, deleniti dolores assumenda perferendis facilis delectus officia! Rem maxime repellat quod sunt?
</div>
<div class="item">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Sed, id. Aut nulla ab vero corporis cupiditate voluptatem fugiat, deleniti dolores assumenda perferendis facilis delectus officia! Rem maxime repellat quod sunt?
</div>
</div>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla rerum voluptatum ex, dolores reiciendis praesentium, assumenda nam ab tenetur nesciunt fugiat molestias totam quas vel eos debitis amet nihil. Asperiores?
</p>
</div>
</main>
2
Answers
I've managed to complete it using the CSS below:
One way could look like this. Basically allowing the element to
gallery
to overflow and preventing the scrollbars on the outer containermain
orbody