始终在动态内容div

时间:2016-04-08 09:05:41

标签: html css

我有几个div加载内容,但每个内容都不同,底部的读取更多链接与内容一起推送。

如何才能将链接粘贴到div的底部?

示例:

enter image description here

一个框的html代码:

<div class="vertical-item gallery-extended-item with_background text-center" style="height: 330px;">
    <div class="item-media">
        <div class="media-links">
            <a class="abs-link" title="" href="nieuwsbericht-5.html"></a>
        </div>
    </div>
    <div class="item-content">
        <h3 class="item-title">
            <a href="nieuwsbericht-5.html">Project test</a>
        </h3>
        <span class="categories-links">
            <a rel="category" href="#" class="theme_button small_button color1">Nieuws</a>
        </span>
        <br>
        <p>Project&nbsp;test opgeleverd - februari 2016</p>
        <p>
            <a href="nieuwsbericht-5.html">Lees verder</a>
        </p>
    </div>
</div>

2 个答案:

答案 0 :(得分:2)

在链接上使用absolute位置,无论上面的文字有多长,他每次都会留在同一个地方。

See it here

.bottom { position: absolute; bottom : 100px; left: 0; right: 0; }

答案 1 :(得分:0)

尝试position:absolute以及bottom,这会将元素从底部20px向上放置。

以下是更新后的代码<a class="sbottom" href="nieuwsbericht-5.html">Lees verder</a>

&#13;
&#13;
.sbottom {
  position: absolute;
  bottom: 20px;
}
&#13;
<div class="vertical-item gallery-extended-item with_background text-center" style="height: 330px;">
  <div class="item-media">
    <div class="media-links">
      <a class="abs-link" title="" href="nieuwsbericht-5.html"></a>
    </div>
  </div>
  <div class="item-content">
    <h3 class="item-title">
            <a href="nieuwsbericht-5.html">Project test</a>
        </h3>
    <span class="categories-links">
            <a rel="category" href="#" class="theme_button small_button color1">Nieuws</a>
        </span>
    <br>
    <p>Project&nbsp;test opgeleverd - februari 2016</p>
    <p>
      <a class="sbottom" href="nieuwsbericht-5.html">Lees verder</a>
    </p>
  </div>
</div>
&#13;
&#13;
&#13;