Align div in the footer inside another div

1

I have a DIV content that includes another call Images, I would like the div images to be at the bottom of the div content with a certain space that I could define, eg: 400px, however this happens:

Iwouldlikeittolooklikethis:

Codestructure:

<divid="content">

<p>TEXTO TEXTO</p>
     <div id="images"></div>

</div>
    
asked by anonymous 20.10.2015 / 01:36

1 answer

3

You basically need to define the main div with position: relative and the child position: absolute div, the rest is to edit as you need it. Here's the example:

  text   

  #content {
    position: relative;
    min-height: 150px;
    width: 100px;
    background: black;
    color: white;
  }
  #images {
    position: absolute;
    background: red;
    width: 80%;
    height: 20%;
    bottom: 0;
    margin-left: 10px;
    margin-bottom: 5px;
  }
<div id="content">
  <span>texto texto texto</span>
  <div id="images"></div>
</div>
    
20.10.2015 / 01:54