php - How to position element in a fixed position inside DIV -
what need in order have these 2 "read now" buttons in same position in each div box, no matter how long description above them is?
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" height="51" valign="middle" style="background: url(../../images/playonline3.jpg)" ><h1>heading</h1></td> </tr> <tr> <td height="150" align="left" valign="top" class="body-text" style="padding:10px"> <div class="box"> <p class="box-title"><a href="http://link/">title1</a></p> <p class="box-desc">this article explains bluffing in general , shows examples of bluffing spots.</p> <a href="http://link" id="button4" class="buttontext">read now</a> </div> </td> <td height="150" align="left" valign="top" class="body-text" style="padding:10px"> <div class="box"> <p class="box-title"><a href="http://link">double barreling</a></p> <p class="box-desc">what double barrel , when use strategy?</p> <a href="http://link" id="button4" class="buttontext">read now</a> </div> </td> </tr> </table>
using position: absolute; can tell buttons stay @ specific point, , never move there.
i added position: relative; class .box
i added position: absolute; bottom: 10px; , left: 0; id #button4
.box { width: 250px; height: 137px; position: relative; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; border: 1px solid #bebebe; background-color: #f6f6f6; color: #990000; font-family: arial, helvetica, sans-serif; line-height: 20px; } #button4 { background: #5c5c5c; position: absolute; bottom: 10px; left: 0; /* ... other styles below ... */ }
Comments
Post a Comment