I'm thinking I'n a decent way of managing my content not quite sure if it's possible thou.
Thought that fexbox can be handy... There are 3 simple cases on how I divided my problem
- I want to have a grid with a background for items which aligns with the biggest element in the row.
- I want to have all the stuff starting in the same line, like: title,description
- I would like to have some items to stretch depending on the amount of content, but then I would like to have the other elements in the grid line, to start at the same row.
As currently this is mostly what I need, although I cannot manage the content to stretch depending on the amount. Some fields can be longer/shorter like description.
Another problem that comes to my mind is:
- How to deal with the unnecessary white spaces?
- Why is my grid element in the second row, the button is cut?
Additionally
First And Last Element can have fixed size.
//=========================== .wrapper { width: 1000px; background: #7BB643; } .flex-box { display: flex; flex-flow: row wrap; flex: 1; } .grid-item { margin: 10px; background: #FFF; flex: 0 1 300px; display: inline-flex; flex-flow: column nowrap; } .flex-item { color: black; display: flex; flex: 1; overflow: hidden; flex-flow: column wrap; } .wishlist-item {} .name {} .long-name {} .desc {} .price-item {} .button-item { justify-content: flex-end; } //============================ //===========colors=========== //============================ .wishlist-item { color: red; } .name { color: grey; } .long-name { color: brown; } .desc { color: orange } .before-price { color: blue; } .price { color: green; }