如何将链接按钮与DIV的底部对齐? [英] how to align a link button to bottom in a DIV?

查看:102
本文介绍了如何将链接按钮与DIV的底部对齐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个链接按钮.还有一个Div元素.我把按钮放在这个Div里面.但是,其垂直顶部对齐.如何将其与底部对齐?

Hi,

I''ve a link button. And a Div element. I put the button inside this Div. But, its vertically top aligned. How do I align it to bottom?

推荐答案

您可以将div位置设为文本框的相对位置和绝对位置:

You can make your div position relative and absolute position your textbox:

<div style="height:100px; removed: relative; background: #00f;">       
    <input type="text" style="position: absolute; top:75px;" />
</div>



我将绝对顶部设置为75px,因为文本框的高度大约为25px.您必须更改此设置以适合您的布局.

本教程中的更多信息和解决方案: http://www.jakpsatweb.cz/css/css- vertical-center-solution.html [ ^ ]



I put the absolute top to 75px because the textbox is about 25px high. You will have to change this to fit your layout.

More info and solutions in this tutorial: http://www.jakpsatweb.cz/css/css-vertical-center-solution.html[^]


您可以尝试以下代码

You can try this code

<div style="height:200px;vertical-align: bottom">
        <asp:LinkButton ID="id1" runat="server" PostBackUrl="abc.aspx"></asp:LinkButton>
    </div>


这篇关于如何将链接按钮与DIV的底部对齐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆