To set div vertical align middle (valign) you need add few css style to main div

In the head


<style>
.main_div{
height:200px
width:500px;
display:table-cell;
vertical-align:middle;
border:1px solid #000000;
}
.block_div{
height:100px;
width:200px;
border:1px solid #000000;
}
</style>

In the body


<div class="main_div">
<div class="block_div">This is middle div</div>
</div>

To set vertical-align bottom of the div, just change the value of vertical-align in class main_div, there should be vertical-align:bottom;

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

RSS Feed

Enter your email address:

Delivered by FeedBurner