Meds
Meds

Reputation: 71

Put a div on the bottom of a content which is in a container

I would like to put a div on the bottom of a subcontent which is itself in a container, sub-contents are dynamically generated.

Here is my html code

<div id="Content">
  <div class="subcontent"></div>
  <div class="subcontent"></div>
  <div class="subcontent"></div>
  <div class="pagenumber"></div>
</div>

My css code:

#content {
float: left;
margin: 0 auto;
min-height: 450px;
overflow: auto;
padding: 10px;
width: 978px;
}
.subcontent {
 float: right;
    height: 70px;
    margin-bottom: 15px;
    width: 700px;
}
DIV.pagenumber {
text-align: right;
 ???
}

Here is a depicting of what I want to do

Upvotes: 1

Views: 74

Answers (1)

PSL
PSL

Reputation: 123739

try clear:both, this will clear any floats. http://jsfiddle.net/Kdt84/

DIV.pagenumber {
text-align: right;
clear:both;
}

Upvotes: 1

Related Questions