DEV Community

Abubakar Abba Ali
Abubakar Abba Ali

Posted on

Translating CSS Games in Real Life Webpages-4

Using Justify-content: flex-center
To Transform the Flexboy Froggy Game into a real-life webpage, here we will work on arranging a product list of items from the starting point of a web page that is the mid and center of the web page, as indicated below:

Image description

The Product list and item will be arranged including its labels that is the Tittle and price list, below is the code for the transformation of justify-content: center;

The Product list and item will be arranged including its labels that is the Tittle and price list, below is the code for the transformation of Justify-content: center;
I. HTML Code:
From this code below; all the product items are defined as classes, starting with the main container serving as the digital Shop shelf Rack, all the Product will be arranged in it.

Image description

II. CSS CODE:

Image description

justify-content:center; - Align a content or product at the center of web page and From this the class .productContainer was linked to the main HTML code using a dot operation(.) and display:flex; it is flexible container that keeps multiple items such as the justify-content, align-items and flex-direction. With it you will display your products both vertically and horizontally.

For the output of the Work, below webpage indicates the position of the Justified content at the center of web page that is the left-hand side similar to the Flexbox Froggy indicated below:

Image description

Top comments (0)