- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Can I define exactly how many items would be in one row?
Yes, by setting a percentage width (with wrapping enabled)….just like a grid system (which flexbox is not).
Did you have a more specific requirement?
Now I have 5 items in a row, but I want exactly 4, because I want bigger pictures.
I think with percentage I can’t do this.
What is supposed to happen to the fifth image?
The answer is, of course, to wrap each link in it’s own div with a width of 25%…but I suspect that’s going to break your layout.
I think you would be better off looking into an actual grid system framework it’s seems to suit what you are trying to do.
As for breaking a flex row…it is possible but it’s a tad hacky and not extendable – http://stackoverflow.com/questions/29732575/line-break-in-multi-line-flexbox
http://codepen.io/Ayalann/pen/QKBYka
The “page-break-after: always;” is work (what you liked) but only in firefox. But it would be perfect.
Maybe the grid property also would be good (I haven’t used it before) but it seems it isn’t popular:
http://caniuse.com/#search=grid
I can’t use it.
I was referring to a grid framework like Bootstrap or Foundation not CSS Grids, the two are quite different.
Okay, thank you!