Closed neal-an closed 5 years ago
Can you post the code?
I can, but it really is as simple as putting two divs inside of "item1". They will show up side by side and I can't get them to stack.
I'm assuming you're using the sample code (correct me if I'm wrong). If you take a look at the styles, you'll notice that every div inside ".container" has it's display set to flex (flexbox guide).
<style>
.container div {
width: 280px;
height: 500px;
background-color: antiquewhite;
/* display set to flex */
display: flex;
/* flex properties */
justify-content: center;
align-items: center;
border-radius: 8px;
}
</style>
Change the display to "block" and it will behave the way you want. You should also delete the flex properties because they have no effect on a block display. Let me know if it works for you. More about the display property.
That was it! I knew it had to be something super basic. Thanks for your help!
No problem.
I am a new coder. I came across this awesome tool on Reddit. I have tried to set it up on a learning project I am working on, but I'm encountering a strange error. I can't seem to put anything inside of the container divs. Whatever I put in there are forced into the width of the box and ignore any attempts to be resized.
I figure I'm probably making a simple mistake, but any advice is welcome.