2

I have 4 div’s in a flex-container and would like to decrease the space between the two div’s indicated in the attached image (Current). I already gave the flex-container the “wrap”-prop. How can I handle that?

Current

current_state

Desired

desired_state

html

<div className="flex-container">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
</div>

css

.flex-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-around;

    div {
        width: 30%;
        min-width: 300px;
    }
}
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
fzoozai
  • 41
  • 2
  • As mentioned in the linked answer I solved my issue by wrapping the two divs in the center in an overarching div. – fzoozai Oct 15 '16 at 19:22

0 Answers0