Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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?
Posted

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

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


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[^]
 
Share this answer
 
v5
You can try this code

XML
<div style="height:200px;vertical-align: bottom">
        <asp:LinkButton ID="id1" runat="server" PostBackUrl="abc.aspx"></asp:LinkButton>
    </div>
 
Share this answer
 
v2
Comments
StianSandberg 24-Jul-12 6:49am    
this does not work. If you want this to work you must set line-height style. And even so this solution will not work perfectly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900