Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1453

Css slider with flex

$
0
0

I have a container with some content based on flex positioning so it is adaptive.And i have silde block which is display:flex.I want to have only 2 items in a row for my slider. Other items should be hidden.I don't know the width of container.

This is my html:

<div class="slider"><div class="item">lorem100</div><div class="item">lorem100</div><div class="item">lorem100</div><div class="item">lorem100</div></div>

This is my css:

.slider {    display: flex;    overflow: hidden;}.item {    height: 150px;}

I have:

I have

I want:

I want

UpdateHow it works now

enter image description here


Viewing all articles
Browse latest Browse all 1453

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>