Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS hell, I just want a box with min sizes and 1 pixel gap
    primarykey
    data
    text
    <p>Please help to achieve this with CSS: I have array of text strings, from 1 char to 200 chars. I need to display them in webpage each in separate box.</p> <ul> <li>the box flow is similar to text, left to right until the end of page then wrap</li> <li>the background color of each box must be cyan.</li> <li>minimal width and height must both be 50 pixels</li> <li>1-2 pixel space between boxes (maybe achieve with margin=1)</li> <li>there must always be at least two pixels between text and the edge of the box</li> <li>text is vertically aligned to middle</li> <li>text is horizontally aligned to center</li> <li>maximum width of box must be 300 px</li> <li>if text does not fit in 50x300 it is cropped inside the box (box will not grow)</li> <li>each box should have 1 pixel black border</li> </ul> <p>this must be simple for someone experienced! I already try almost every possible CSS tag; but always something is wrong. I read about CSS boxing, but surprisingly it just made it more compilcated.</p> <pre><code>&lt;style&gt; z { min-width: 50; #min-height: 50; padding: 1px; padding-color: magenta; margin: 1px; margin-color: red; #padding-left: 10px; display: table-cell; #height: 50; #vertical-align: middle; #text-align:center; background-color: cyan; #border: 1px; #border-color:green; /* padding:10px 10px 10px 10px; */ border-top:1px solid border-style:solid; border-color:#ff0000 #0000ff; outline-style:dotted; outline-color:#00ff00; outline-width: 1px; color: blue; } &lt;/style&gt; &lt;html&gt; &lt;z&gt;1&lt;/z&gt; &lt;z&gt;abcdefghijklmnope&lt;/z&gt;&lt;z&gt;2&lt;/z&gt;&lt;z&gt;blablablabla&lt;/z&gt; &lt;/html&gt; </code></pre> <p>I am pasting this so just you can see how hard and wrong I try.</p>
    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