在滚动条下显示填充

时间:2016-03-24 07:45:05

标签: html css

我有div。我已将样式overflow: auto添加到div中 - 这使其看起来像this

我的问题是:如何在内容下添加空间 - 如this(正如您所看到的,文本下方有一个空格 - 我使用绘画制作了这个空间。

我的代码是:

<div class="background" style="overflow: auto;">
<h2>ABOUT</h2>
<p>And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an exampleAnd welcome to my profile! This is an exampleAnd welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an example And welcome to my profile! This is an exampleAnd welcome to my profile! This is an example</p>
</div>

1 个答案:

答案 0 :(得分:3)

您需要检查是否返回行,如果行是&gt; 0,只需更改

if (mysqli_num_rows($pendingrequests )==0) {

if (mysqli_num_rows($pendingrequests ) > 0) {