title: Inline div broken when in p element
body: <p>I want to have an inline div within text, so that the div contains two lines of text aligned vertically. </p>
  
  <p>The initial solution:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div.chinese-word {
      display: inline-block;
  }
  
  div.chinese-word div {
      text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>This is a Chinese word &lt;div class="chinese-word"&gt;&lt;div&gt;wǒ&lt;/div&gt;&lt;div&gt;我&lt;/div&gt;&lt;/div&gt; in an inline div</code></pre>
  </div>
  </div>
  </p>
  
  <p>However, it gets broken whenever I put it inside p paragraph. (it might not be the only case). </p>
  
  <p>Invalid!
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div.chinese-word {
      display: inline-block;
  }
  
  div.chinese-word div {
      text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;This is a Chinese word &lt;div class="chinese-word"&gt;&lt;div&gt;wǒ&lt;/div&gt;&lt;div&gt;我&lt;/div&gt;&lt;/div&gt; in an inline div&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>It does not even pass validation. I found out that p must contain inline elements only so I switched to spans. But no matter what styling I use, I can't get the same result. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>span.chinese-word {
      display: inline-block;
  }
  
  span.chinese-word span {
      text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;This is a Chinese word &lt;span class="chinese-word"&gt;&lt;span&gt;wǒ&lt;/span&gt;&lt;br/&gt;&lt;span&gt;我&lt;/span&gt;&lt;/span&gt; in an inline span&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Clearly, the texts in spans are not horizontally centered anymore. (Both lines appear to be left-aligned).</p>
  
  <p>The p element might have its own styling so I don't want to manipulate it and rather need context-independent solution.</p>