I have an html page called presets page. This page contains different (child) divs and I am having a hard time on how I could center all these divs within the container (parent) div. These preset divs are currently in flexbox. Apologies if this question has been answered already, I really suck in centering elements in html/css.
It currently looks like this.
And I want it to look somewhat like this.
I tried using justify-content: center but how can I make the last line align to the left/right to look like this?
Here is the HTML:
<div class="presets-container">
  {% for presets in presets_list %}
  <div class="preset">
    <div class="container">
      <div class="row" id="header">
        <div class="col-7">
          <h1>{{ presets.preset_name|hide_preset_suffix }}</h1>
        </div>
        <div class="col-5">
          <div class="options">
              <div style="cursor:pointer;" class="button pr_edit" id="{{ 'load,'|create_id:forloop.counter }}" onclick="loadPreset(this.id)">LOAD</div>
              <div style="cursor:pointer;" class="button pr_edit" id="{{ 'delete,'|create_id:forloop.counter }}" onclick="deletePreset(this.id)">DELETE</div>
          </div>
        </div>
      </div>
    </div>
  </div>
{% endfor %}
</div>
Here is the CSS for the presets container:
.presets-container{
  background-color: pink;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}