Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing overflow:auto on a container to contain long paragraphs of text
    primarykey
    data
    text
    <p>I've got a container with 10px padding all round. It has a set height on it and overflow:auto in order to contain the 'description' which can be as much as 1000 characters long.</p> <p>Here is what it looks like with no overflow...</p> <p><img src="https://i.stack.imgur.com/uSOl5.png" alt="enter image description here"></p> <p>And here it is with a overflow:auto on the container.</p> <p><img src="https://i.stack.imgur.com/A4gNt.png" alt="enter image description here"></p> <p>This adds a scrollbar which is the desired effect. However, despite there being 10px of padding on the bottom of the container, the text continues to the very bottom of the containers edge, suggesting that padding isn't taken into account when overflowing. I've tried adding more padding but as expected it makes no difference.</p> <p>Here is the HTML...</p> <pre><code>&lt;div class="journix-info-inner input-container shadow-bottom"&gt; &lt;div class="info-header"&gt; &lt;h2 class="journix-title"&gt; &lt;?php echo $row['title']; ?&gt; &lt;/h2&gt; &lt;h3 class="journix-user"&gt; by &lt;?php echo $row['user_id']; ?&gt; &lt;/h3&gt; &lt;/div&gt; &lt;p class="info-content"&gt; &lt;?php echo $row['description']; ?&gt; &lt;/p&gt; &lt;/div&gt; </code></pre> <p>And here is the CSS...</p> <pre><code>.journix-info-inner { margin-right:310px; max-height:360px; overflow:auto; padding:10px; } </code></pre> <p>This screenshot shows the padding and how the text is overlapping the bottom 10px of padding.</p> <p><img src="https://i.stack.imgur.com/4wbId.png" alt="enter image description here"></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