Allign a div at bottom

4 replies
  • WEB DESIGN
  • |
Hi,

How we can align a div at bottom of another div.

Suppose one div has height 530px contains two more divs i want one at top and second at bottom of main.

Thanks in advance.
#allign #bottom #css #div #html
  • Profile picture of the author SmartWeb
    just use <br> tag between the two <div> blocks.
    {{ DiscussionBoard.errors[2695678].message }}
  • Profile picture of the author Evan-M
    put the 2 div in a container div

    the container should be the same width.

    then just float both left, the second should go under the first and line up


    EX:

    <div id="container">
    <div id="div1"></div>
    <div id="div2"></div>
    </div>
    Signature

    Evan-M

    Easily The Worlds Best Wordpress Popup plugin

    Visit Website Design Firm For All Your Wordpress Coding Needs

    {{ DiscussionBoard.errors[2695699].message }}
    • Profile picture of the author ram07
      Hi,

      This will do for you......

      <div id="main" style="height:300px;">

      <div>sdsd sdfds dssd</div>

      Some content....

      <div style="margin-top:300px;">sdsdsd sdsd</div>

      </div>
      {{ DiscussionBoard.errors[2699541].message }}
  • Profile picture of the author web.tech
    Put that 2 divs into a container and give same width to that divs, float left. Then the first div goes to top and the second goes to bottum.
    {{ DiscussionBoard.errors[2879944].message }}

Trending Topics