Home > Back-end >  Position div to bottom without position absolute?
Position div to bottom without position absolute?

Time:01-26

Is it possible to position div to bottom without using position:bottom? Actually, I can do it with:

bottom: 0;
position:absolute;

But because I'm using float: right , I can't use position:absolute

So what is the best solution? :3

CodePudding user response:

You can use display: flex to position an element to the bottom, though it will affect all of your elements placed into that div.

To position an element to the bottom using flex try this:

.container {
  display: flex;
}

.button {
  align-self: flex-end;
}

  • Related