Computer scienceFrontendCSSFlexbox

Orientation and Display order

Flex-flow

Report a typo

Use flex-flow property to make online shop item cards display in the opposite order and move to the next line in case of overflow.

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<title>Flex-wrap</title>
</head>
<body>
<div class="catalog">
<div class="product product1">
<img src="https://i.ibb.co/GVwHH3C/placeholder.jpg">
<p class="name">Name of the product 1</p>
<p>Ordered 124 times</p>
<p><strong>Price: 100$</strong></p>
</div>
<div class="product">
<img src="https://i.ibb.co/GVwHH3C/placeholder.jpg">
<p class="name">Name of the product 2</p>
<p>Ordered 1321 times</p>
<p><strong>Price: 100$</strong></p>
</div>
<div class="product">
<img src="https://i.ibb.co/GVwHH3C/placeholder.jpg">
<p class="name">Name of the product 3</p>
<p>Ordered 1321 times</p>
<p><strong>Price: 100$</strong></p>
</div>
<div class="product">
<img src="https://i.ibb.co/GVwHH3C/placeholder.jpg">
<p class="name">Name of the product 4</p>
<p>Ordered 1321 times</p>
<p><strong>Price: 100$</strong></p>
</div>
<div class="product">
<img src="https://i.ibb.co/GVwHH3C/placeholder.jpg">
<p class="name">Name of the product 5</p>
Completed 0 of 1
Flex-flow property applied
___

Create a free account to access the full topic