So bascially I am trying to have a div in flexbox that contains other divs and I want to be able to change flex-direction by clicking two buttons above it.
<body>
<div>
<button class="button-1">Display Column</button>
<button class="button-2">Display Row</button>
</div>
<div class="main">
<div class="container-1">One</div>
<div class="container-2">Two</div>
<div class="container-3">Three</div>
</div>
<style>
.main{
display: flex;
}
</style>
</body>
I am new to JS and I cant find anything that would work. Any Help?