title: Why is my background color not showing if I have display: inline?
body: <pre><code>&lt;html&gt;
      &lt;body&gt;
         &lt;div style="display: inline; background-color: #555;"&gt;
              &lt;h3&gt;test&lt;/h3&gt;
         &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my code. I am wondering why my background color isn't showing. If I change css display from inline to block, then it show up. Why is it not showing up if display is inline? <strong>I am trying to understand the reason of the problem other than looking for a solution.</strong></p>