I have a div called block_inside. In it, there are two divs, text_block and text_block_button.Button class in text_block_button shows and hides about class(paragraph) using jquery.text_block and text_block_button divs are inline. When I click button, div expands and shows “about” class.While showing and hiding about class, how can align button class to the bottom of block_inside div. Here is html codes:
<div class="block_inside">
<div class="text_block">
<p>Here is paragraph. </p>
<p class="about">Here is hidden paragraph.(more than 500 words.) </p>
</div>
<div class="text_block_button">
<a class="button">About</a>
</div>
</div>
Here is css codes :
.block_inside {
display:block;
border:1px solid #FFFFFF;
overflow:auto;
padding-left: 10px;
}
.text_block {
float:left;
width:600px;
margin-left:30px;
padding: 0px;
}
.text_block_button {
float: right;
padding-right: 15px;
padding-bottom: 5px;
padding-left: 5px;
}
a.button {
padding:5px 10px 5px 10px;
color: #ffffff;
text-decoration: none;
border:1px solid #32312f;
text-transform:uppercase;
font-size:9px;
line-height:25px;
}
Here is jquery code :
<script>
$(document).ready(function() {
$('p.about').hide();
$('a.button').click(function() {
$('p.about').toggle();
});
});
</script>
demo jsBin