title: How to make space between elements inside div container
body: <p>I have a flex-container which will be dynamically filled by elements. <strong>Container doesn't have fixed width</strong> (I use <code>max-width: max-content;</code>) and can contain as many element as I want. The problem is that I need spacing between these elements, but don't need spacing on the left and right side between an element and the container.</p>
  
  <p>Of course I can do it with <code>.element{margin-right: 10px}</code> and <code>.element:last-child{margin-right: none;}</code>, but is there a way to achieve it without pseudo-classes and JS?</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="element"&gt;my element&lt;/div&gt;
    &lt;div class="element"&gt;my element&lt;/div&gt;
    ...
    &lt;!-- nubmer of elements changing --&gt;
    ...
  &lt;/div&gt;
  </code></pre>