Relative Content

Tag Archive for htmlcssflexbox

Flexbox width calculation when wrapping children

I have a flexbox with a varying amount of children. All children have the same size (i.e., 96px). The flexbox has wrapping enabled.
When all children fit in the same row, the flexbox’s reported width is less than what the parent offers (intended behaviour). However, as soon as wrapping happens, the flexbox always fills the entire parent.

Flexbox container wont take the entire width and height on my page

Hello everyone im trying to create an html page with a header, main, footer layout. Every element is inside a flexbox column container. The problem is that when im viewing the page with mobile toolbar on chrome set to an iphone 14 pro max the page looks like the photo bellow: