How to align content of a div to the bottom

后端 未结 26 2494
挽巷
挽巷 2020-11-22 01:13

Say I have the following CSS and HTML code:

相关标签:
26条回答
  • 2020-11-22 02:05

    2015 solution

    <div style='width:200px; height:60px; border:1px solid red;'>
    
        <table width=100% height=100% cellspacing=0 cellpadding=0 border=0>
            <tr><td valign=bottom>{$This_text_at_bottom}</td></tr>
        </table>
    
    </div>
    

    http://codepen.io/anon/pen/qERMdx

    your welcome

    0 讨论(0)
  • 2020-11-22 02:08

    The site I just did for a client requested that the footer text was a high box, with the text at the bottom I achieved this with simple padding, should work for all browsers.

    <div id="footer">
      some text here
    </div>
    
    #footer {
      padding: 0 30px;
      padding-top: 60px;
      padding-bottom: 8px;
    }
    
    0 讨论(0)
提交回复
热议问题