Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS Display:Inline-block mis-aligns when multi line text is present
    primarykey
    data
    text
    <p>Everything looks and works fine as the jsFiddle shows, but if you add enough text to the LOGIN SECTION box, to make the text split across multiple lines, it pushes the outer 2 header blocks out of alignment. It appears as though if I add text in the center box, the outer boxes appear to drop to the line where the text ends. I.E - Make "login section" repeat for multiple lines and it pushes the outer boxes down.</p> <p>Link to correct jsFiddle - <a href="http://jsfiddle.net/d7xXB/" rel="nofollow">http://jsfiddle.net/d7xXB/</a></p> <p>HTML</p> <pre><code>&lt;body&gt; &lt;div class="wrapper"&gt; &lt;div class="headerblock"&gt;Logo 1 Here&lt;/div&gt; &lt;div class="headerblockmiddle"&gt;Login Section Login Section Login Section Login Section Login Section&lt;/div&gt; &lt;div class="headerblock"&gt;Logo 2 Here&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>CSS</p> <pre><code>* { margin: 0; padding: 0; } .wrapper { -webkit-box-shadow: 3px 3px 5px rgba(50, 50, 50, 0.75); -moz-box-shadow: 3px 3px 5px rgba(50, 50, 50, 0.75); box-shadow: 3px 3px 5px rgba(50, 50, 50, 0.75); -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; width:800px; min-height:550px; margin-left: auto; margin-right: auto; background-color:#FFF; margin-top:10px; padding: 5px; position:relative; display:block; text-align:center; } body { background-color: #2a8dba; } .headerblock { position: relative; margin: 0 auto; display:inline-block; height: 85px; width: 200px; background-color:#CCC; padding: 0px; /* For IE 7 */ zoom: 1; *display: inline; } .headerblockmiddle { position: relative; margin: 0 auto; display:inline-block; height: 85px; width: 370px; background-color:#CCC; padding: 0px; /* For IE 7 */ zoom: 1; *display: inline; } </code></pre> <p>Any help is greatly appreciated, thanks. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload