Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS text float alignment
    primarykey
    data
    text
    <p>See the image: </p> <p><img src="https://i.stack.imgur.com/gluDy.png" alt="enter image description here"></p> <p>I want, without using Javascript that if the text of .elements (view the html at the end) is too long, that it separate is placed on two lines in the grey area.</p> <p>"Hello world! Hello StackOverFlow!" is the text that should be separated.</p> <p>** If you think that something is missing, or I didn't explain myself enough, just ask I will try my best to provide you what you want to know ;)</p> <h1>HTML</h1> <pre><code>&lt;div class="filter"&gt; &lt;div class="left"&gt;&lt;/div&gt; &lt;div class="center"&gt; &lt;div class="arrow"&gt;Search Filter Research Text Test&lt;/div&gt; &lt;div class="head"&gt;&lt;/div&gt; &lt;div class="element"&gt;&lt;div&gt;Hello World! Hello StackOverFlow!&lt;/div&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="right"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <h1>CSS</h1> <pre><code>.table .filter { height: 44px; position: relative; } .table .filter div { height: 44px; } .table .filter .left { width: 7px; position: absolute; left: 0; background: url('../images/Tableau/filtre/gauche.png') no-repeat; } .table .filter .right { width: 7px; position: absolute; right: 0; background: url('../images/Tableau/filtre/droit.png') no-repeat; } .table .filter .center { background: transparent url('../images/Tableau/filtre/centre.png') repeat-x; left: 7px; right: 7px; position: absolute; } .table .filter .center&gt;div { float: left; } .table .filter .center .arrow { background: url('../images/Tableau/filtre/fleche-centre.png') repeat-x; } .table .filter .center .head { width: 13px; background: url('../images/Tableau/filtre/fleche.png') no-repeat; } .table .filter .center .element { text-align: center; margin: auto; } .table .filter .center .element&gt;div { width: 100%; text-align: center; } </code></pre>
    singulars
    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