How to make responsive website | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make responsive website

28th Sep 2020, 5:14 AM
Coder
Coder - avatar
1 Answer
+ 4
Using media queries, @media (max-width: 1000px) { .product { padding: 10px; } } So you would use this syntax to specify a minimum width (in this case 1000px) and specify the changes in css rules that would happen when width of browser reaches 1000px or below. Use display: flex too, i use it literally everywhere, search a few tutorials on youtube for that. Such as, if you have a page where you show all the product cards, so on the container, just use: display: flex; flex-wrap: wrap; This would make arrangement of the product cards responsive, you can use: justify-content: center; to center horizontally, align-items: center to center vertically.
28th Sep 2020, 5:40 AM
maf
maf - avatar