Forums

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

Home Forums CSS [Solved] css – width fit to content Reply To: [Solved] css – width fit to content

#197528
Beverleyh
Participant

I’m on iPhone it the mo so can’t test much, but how about removing float:left; on .square and going for display:inline-block; instead.

Also, set white-space:nowrap; on .wrapper

This will introduce a gap around the squares – something Chris covers here with some counteractive solutions https://css-tricks.com/fighting-the-space-between-inline-block-elements/ – but at least it should get them sat in a row.