Need to display each item width 50% with overflow-x: scroll.
But it is displaying 3 items instead 2 items.
Here is my desired output-
But my output is like this-
.products {
flex-flow: row nowrap;
overflow-x: scroll;
white-space: nowrap;
display: flex;
}
.products li {
width: calc(100% / 2);
}
<ul class="products">
<li class="temashop-product">
<a href="#">
<img src="assets/images/product-placeholder.png" alt="Product">
<h2>Product heading</h2>
<p class="short-description">Product description</p>
<span class="price">$35.00</span>
</a>
</li>
<li class="temashop-product">
<a href="#">
<img src="assets/images/product-placeholder.png" alt="Product">
<h2>Product heading</h2>
<p class="short-description">Product description</p>
<span class="price">$35.00</span>
</a>
</li>
<li class="temashop-product">
<a href="#">
<img src="assets/images/product-placeholder.png" alt="Product">
<h2>Product heading</h2>
<p class="short-description">Product description</p>
<span class="price">$35.00</span>
</a>
</li>
<li class="temashop-product">
<a href="#">
<img src="assets/images/product-placeholder.png" alt="Product">
<h2>Product heading</h2>
<p class="short-description">Product description</p>
<span class="price">$35.00</span>
</a>
</li>
</ul>