R
R
Raul Abdullin2018-02-24 01:02:07
css
Raul Abdullin, 2018-02-24 01:02:07

How to press the inner block to the bottom of the outer block in layout?

It is necessary to do so, i.e. a white plate is pressed to the bottom of the block with a photo:
5a908f197f26f767169840.png
I have it like this, i.e. pinned to the top of the photo:
5a908f3e7dd32794611434.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-02-24
@xmoonlight

HTML:

<div class="poster">
  <div class="info">
      Lorem ipsum...
  </div>
</div>

CSS:
.poster {
   display:inline-block;
   width:100%;
   position:relative;
}
.poster .info {
   position:absolute;
   left:0px;
   bottom:0px;
}

I
ink, 2018-02-24
@AskMy

https://codepen.io/topicstarter/pen/PQdwoK like this... just don't forget to insert metaviewport

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question