title: CSS: How can I center 2 elements next to each other (inline-block) only that share a container with other elements?
body: <p>I'm creating a userstyle for a website, so I can't change any HTML, just pure CSS.</p>
  
  <pre><code>&lt;div class="container"&gt;&lt;/div&gt;
  
     &lt;divs&gt;
     &lt;h2s&gt;
     &lt;uls&gt;
     &lt;forms&gt;
     &lt;h3&gt;&lt;/h3&gt;
     &lt;p&gt;&lt;/p&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to make h3 and p be next to each other and in the horizontal center of the container. So, I gave both of them display:inline-block and text-align:center. That made them be next to each, but not horizonatly centered. text-align:center only works if it is applied to the container, but that would be centering all the text of the other elements of the entire site.</p>
  
  <p>I'm relatively new to CSS and I've searched for a way to do this, but with no avail.</p>