In a container, I’m trying to simply have some Header Text in a row along the top, and two Boxes side-by-side (LeftBox and RightBox) below that. The code I have displays successfully on my desktop screen, and even on my phone screen, but when I turn my phone horizontally, the Header Text and the LeftBox are in the same row, and the RightBox is below them. Any help with keeping the Header Text above it all, (so the LeftBox and RightBox are in a row together when it’s a different view) will be appreciated. Here’s my code:
Wrap your boxleft and boxright in a parent div, then move your flex rules there. Then you can set to flex-flow: row nowrap; if you don’t want them wrapping.
Just keep the code simple. No need for any flex rules on the header text if you want it on top. It could also just be an h tag but I wrapped a div around it.
How can I change this so that ‘Header’ is in a column on the left, and in the column on the right ‘Left Box’ and ‘Right Box’ are rows stacked on top of each other? I tried many things (and searched) without success. Any help will be appreciated.
Would you like to post a working page complete with surrounding (outer, etc.) boxes so we can see your current code? (as requested in the posting guidelines).
Since the code in your first post was using flexbox…
A search for “flexbox layout” would have lead you in the right direction.
Then all you needed to do was apply yourself to those references. That’s how most of us around here learn, by reading the specs and putting those concepts into practice.