Struggling with grid / flexbox

I understand grid and flexbox - I think. The problem is that I don’t understand them in conjunction with ads on the side. Ad boxes need to be the same height as the rest of the content on the left if say you have an article on the left. How does that work? No YouTubes explaining it. No articles explaining it. Any help?

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you.

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

You can create a div with display flex that takes 100% width of the page and set the height of the children to 100% that way it will always take the same height similar thing with the width

<div class="container">
    <div class="child"></div>
    <div class="child"></div>
</div>
css body { margin: 0; } .container { background-color: blue; height: 300px; width: 100%; display: flex; justify-content: space-between; } .child { background-color: red; height: 100%; width: 20%; } try this

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.