I'm in a situation where I have two .container
elements, both set at a height of 50%.
Within these containers are the child divs .element
, which belong to their respective parent divs .container
.
The problem arises when applying media queries with flex-direction: column
to make the containers stack on top of each other simultaneously, resulting in them overlapping.
How can I adjust my CSS code to ensure that the two .container
divs stack properly?
Included below are links to two images for reference: one showing both .container
divs before media queries were applied and one after.
Code
.pageContent {
display: flex;
flex-direction: column;
overflow: auto;
padding: 8px;
}
.pageContent.broaden > .container {
display: flex;
flex-direction: row;
height: 50%;
}
// More CSS properties here...
@media screen and (max-width: 800px), screen and (max-height: 600px) {
// Media query specific styles
}
// Additional CSS rules for styling elements
// HTML Markup containing various elements and styles
Thank you kindly for your support.