我有一个网站,http://www.veluwenkamp.nl 在主页底部,您可以找到 4 个列表项(图片),它们对齐不太好,必须在一条水平线上。
我尝试了一切,但我无法让它工作。大家能给我一些建议吗?
提前致谢,
请明确:都到 ul 类 .lijstul 并尝试
在列表前添加一个<div style="clear:both"></div>
。
<div style="clear:both"></div><ul class="lijstul">
<li class="lijstil">
<div class="portfolio-blockimg3">
<div class="portfolio-imgbox3"><img class="boximg-pad" src="http://www.veluwenkamp.nl/wp-content/themes/veluwenk/timthumb.php?src=http://www.veluwenkamp.nl/vknieuw3/wp-content/uploads/2012/10/picisto-20121022090807-597254.jpg&h=86&w=196&zc=1" alt=""></div>
</div>
</li>
<li class="lijstil">
<div class="portfolio-blockimg3">
<div class="portfolio-imgbox3"><img class="boximg-pad" src="http://www.veluwenkamp.nl/wp-content/themes/veluwenk/timthumb.php?src=http://veluwenkamp.nl/afbeeldingen/IMG_1359.jpg&h=86&w=196&zc=1" alt=""></div>
</div>
</li>
<li class="lijstil">
<div class="portfolio-blockimg3">
<div class="portfolio-imgbox3"><img class="boximg-pad" src="http://www.veluwenkamp.nl/wp-content/themes/veluwenk/timthumb.php?src=http://www.veluwenkamp.nl/vknieuw3/wp-content/uploads/2012/11/sgfw-30.jpg&h=86&w=196&zc=1" alt=""></div>
</div>
</li>
<li class="lijstil">
<div class="portfolio-blockimg3">
<div class="portfolio-imgbox3"><img class="boximg-pad" src="http://www.veluwenkamp.nl/wp-content/themes/veluwenk/timthumb.php?src=http://www.veluwenkamp.nl/vknieuw3/wp-content/uploads/2012/10/20090619_3844_6.jpg&h=86&w=196&zc=1" alt=""></div>
</div>
</li>
</ul>
你会得到对齐
您可以通过clear: both
在您的ul
.lijstul {
clear: both;
...
}
ul.lijstul {
width: 100%;
overflow: hidden;
}