Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Align an element to bottom with flexbox

$
0
0

I have a div with some children:

<div class="content"><h1>heading 1</h1><h2>heading 2</h2><p>Some more or less text</p><a href="/" class="button">Click me</a></div>

and I want the following layout:

 -------------------|heading 1          ||heading 2          | |paragraph text     ||can have many      ||rows               ||                   ||                   ||                   | |link-button        | -------------------

Regardless how much text is in the p I want to stick the .button always at the bottom without taking it out of the flow. I've heard this can be achievable with Flexbox but I can't get it to work.


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>