开发者

How to place the div content at the bottom of the outer div irrespective of height changes in outer div

开发者 https://www.devze.com 2023-04-11 02:17 出处:网络
I have an html where i want to add another div within the description class div <div id=\"desc\" class=\"col4\">

I have an html where i want to add another div within the description class div

<div id="desc" class="col4">
    <div class="开发者_如何学Cdescription">
        <div style="font-size:20px; font-weight:700; padding-bottom:10px;">
            <?php echo $auction['Product']['title']; ?>
        </div>
        <span class="detaildesc"><?php echo $auction['Product']['description'];?></span>
    </div>
</div>

We can add div after the span tag but how do i make sure that the newly added div always appears at the bottom. The height of the description class div increases dynamically with respect to the height of another div. So how to add another div within that class and make it appear at the bottom irrespective of the height changes.


You can add "position:relative" to class ".description" and the new-inserted div should has some styles like this :

. new_div {position:absolute; bottom:0px;}
0

精彩评论

暂无评论...
验证码 换一张
取 消