-
AuthorPosts
-
May 6, 2021 at 7:03 pm #1298850
Hi Kriesi
I am building a page see private link.
The rows are alternate so go like this
2/5+1/5+1/5+1/5
Next row 1/5+1/5+1/5+2/5 [this row needs to flex]
And so on
Each 2/5 text box needs to be first on mobile view.
How can I use flex styling to get this to work please?
It seems your rows are now delineated into rows but it is just columns so I have put a divider between each. If we use flex styling how should I delineate between the rows.
Many thanks, HelenMay 9, 2021 at 5:44 pm #1299173Hey helban,
Thank you for your patience and the link to your page, with the way that flex works with row or column reverse, or even order, the rows you are creating need to be wrapped in a container so the inner elements can be ordered or reversed. For this reason, we have the Grid Row element, to use this in your situation you would add the Grid Row and 4 cells:
and then use the Set Cell Size option to set your 2/5+1/5+1/5+1/5
and then add your inner cell content
for this example I will clone the Grid Row 3 times and use the Set Cell Size option to alternate the rows for desktop as in your example 1/5+1/5+1/5+2/5, then for the mobile css it will be easier to add custom IDs to each of the Grid Rows in the Advanced Tab > Developer Settings
I recommend using lower case letters only and each ID must be different and unique to your whole site, for this example I’m using one, two, three.
Then for the mobile flex column reverse of this one row you would use this css in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:@media only screen and (max-width: 767px) { #two { display: flex; flex-direction: column-reverse; } }
Best regards,
MikeMay 10, 2021 at 3:53 am #1299200in addition to that above – you can even set an order number for responsive case:
https://css-tricks.com/snippets/css/a-guide-to-flexbox/ : see on the right side there are the flex-item properties.May 11, 2021 at 5:19 am #1299531 -
AuthorPosts
- You must be logged in to reply to this topic.