Home > OS >  display: flex; not working in less than 480 pixel to 320 pixel of screen size
display: flex; not working in less than 480 pixel to 320 pixel of screen size

Time:10-18

Can anyone plz help me i am stuck in this from a while. my product display cards are not in flex position when i set the screen the size width between 320 to 480 pixel. Hope any css expert can help me. and i also did some diff size of screen by @media screen. But plz view this coding more than width of 480 px to understand what i want to make :) i pasted my both html and css code below.

all the pics are in github but css is 1 or 2 line old in github respo. current solution

A few hypotheses behind my code:

  • I assumed you need to show at most 3 categories on the same line [from your original solution]
  • I assumed that when the width decreases under 320px it is better to have one item per line [in order to improve the UX]
  • I assumed that in case of large screen you don't want to stretch the maximum number of elements per line [3 because of what said in my first hyp] in order to keep quality pictures, so if the screen it's larger than 750px the elements will stop stretching

Without further ado, this is the 1perline 2perline 3perline

Have a good day,
Antonino

  • Related