Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS: Formatting blocks. Strange height behaviour or how to adjust height by content inside th block
    primarykey
    data
    text
    <p>I am not really familiar with CSS, and come across the following problem:</p> <p>I am making list of 3 item (actually they are divs), and added an image title, and some description inside each of them. Everything was good, till that time when I was requested to add another block after this one... And after I tried it, I investigated that the added block almost completely covers the news list :(</p> <p>here is the code which generates a news list + style</p> <pre><code>// in loop for 3 items &lt;div class="newslist"&gt; &lt;a href="{{ item.get_absolute_url }}"&gt; &lt;img src="{% thumbnail item.main_image 230x220 crop %}" alt="{{ item.image_description}}"/&gt; &lt;/a&gt; &lt;br /&gt; &lt;a href="{{ item.get_absolute_url }}" class="article_title"&gt;{{ item.title }}&lt;/a&gt; &lt;p&gt;{{ item.short_description|truncatewords:35}}&lt;/p&gt; &lt;/div&gt; </code></pre> <p>Style:</p> <pre><code>.newslist{ display:block; height:auto; width: 22%; float:left; padding: 10px; text-align: left; } .newslist a{ margin-top:30px; font-size:12px; color: #be1e2d; text-decoration:none; } .newslist a:hover{ text-decoration:underline; } .newslist br{ padding: 10px; } .newslist img{ width:150px; height:140px; text-align: padding: 5px; margin-bottom:20px; border: 1px solid #CCCCCC; background:#f1efef;` } .newslist p{ font-size:11px; } .newslist a:hover img{ border: 1px solid blue; } </code></pre> <p>The complete code of homepage is here: <a href="http://j-in.org.ua" rel="nofollow noreferrer">http://j-in.org.ua</a></p> <p>Here is the screenshot of the problem if following: <a href="http://img.skitch.com/20091021-d9y2i9h5cpxgk69fji2ue5pcib.png" rel="nofollow noreferrer">http://img.skitch.com/20091021-d9y2i9h5cpxgk69fji2ue5pcib.png</a></p> <p>And also the code of new block is following:</p> <pre><code>&lt;div id="newblock"&gt; Text &lt;/div&gt; </code></pre> <p>I just added bg color in styles...</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.
 

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