Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Grid layout widths Re: Grid layout widths

#129612
Paulie_D
Moderator

Without using flexbox I don’t think think your aim is possible with pure CSS*.

You seem to want the box elements to either fit their contents **or** be wide enough to fit the remainder of the width of the ‘row’….but you don’t want to set widths at all.

The closest think I can think of is to use `display:inline-block`rather than floats.

See: **http://codepen.io/Paulie-D/pen/yJBLC**

I’ve set the wrapper to 50% so the whole think is responsive but a fixed pixel width will work if that’s what you want.

Otherwise, a JS solution would be required.

*Of course now someone will come along an prove me wrong.