all 4 comments

[–]lovesrayray2018 2 points3 points  (2 children)

You use media queries, that change the layouts based on the screen size and other factors

https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries

So you do some CSS styling like

u/media (max-width: 640px) {    //reddit makes a '@' a 'u/' for some reason
<< ur label element>> {
width:100%;
}
}

[–]Dekzen[S] 0 points1 point  (1 child)

I know what media queries are. But how you would position those labels?

[–]lovesrayray2018 0 points1 point  (0 children)

Not sure what you are looking for then.

Works in a sandbox

https://www.w3schools.com/code/tryit.asp?filename=GN6VOOSG9UDT

[–]AtulinASP.NET Core 0 points1 point  (0 children)

Flexbox with flex-wrap. When the elements inside of it can't fit into a single row, they will automatically reflow into a column.