Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok.</p> <ol> <li><p>Don't use made up/invalid HTML elements or invalid CSS comments. Just because "it doesn't seem it matters", doesn't mean it won't make problems. When your HTML/CSS is invalid it's impossible to tell if that's the problem or not and you'll only get answers that tell you to correct them.</p></li> <li><p>CSS requires units on lengths. <code>min-width: 50;</code> is invalid and if it's working for you, that just means you aren't writing corrent HTML/CSS and the document is in Quirks mode, meaning the browser emulates old IE errors, which makes debugging just more difficult.</p></li> <li><p>There is no such properties as <code>padding-color</code> or <code>margin-color</code>. Don't make up things. Use a CSS and a validator to check your code. (<a href="http://validator.w3.org" rel="noreferrer">http://validator.w3.org</a> and <a href="http://jigsaw.w3.org/css-validator/" rel="noreferrer">http://jigsaw.w3.org/css-validator/</a>).</p></li> <li><p>Using <code>display: table-cell;</code> will just place all elements in one "table row" with no wrapping.</p></li> </ol> <p>&nbsp;</p> <pre><code>&lt;p&gt;&lt;span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span&gt;&lt;span&gt;abcdefghijklmnope&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span&gt;&lt;span&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span&gt;&lt;span&gt;blablablabla&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; p { min-width: 50px; max-width: 300px; height: 50px; padding: 2px; margin: 1px; float: left; background-color: cyan; border: 1 px solid blue; color: blue; overflow: hidden; } p &gt; span { display: table; height: 100%; width: 100%; } p &gt; span &gt; span { display: table-cell; vertical-align: middle; text-align: center; } </code></pre> <p>See <a href="http://jsfiddle.net/DyzAD/1/" rel="noreferrer">http://jsfiddle.net/DyzAD/1/</a></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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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