I have a question about styling:
I want to align buttons from different divs which are all contained in a wrapper div:
<div wrapper>
<div 1> Image Text... (button1) </div>
<div 2> Image Text... (button2) </div>
<div 3> Image Text... (button3) </div>
</div>
The texts in each child div are different lengths, but I need the buttons 1 2 and 3 to be on the same height.
For a reference (and my actual problem for you to look at):
http://www.maf-swiss.org/fliege-mit/#mitarbeiter_werden (just scroll down a bit, the 3 pictures are where the child divs start and the text and buttons are below)
As you can see the buttons simply go after the text, I tried many things, but I always seem to reference the child div only, and not the wrapper div.
Do I need to use position absolute in the child divs such that the first relative positioning is the one from the wrapper div? (if that makes any sense, otherwise ignore this :D)
Is this achievable using CSS only or do I need to change the layout of that section?
EDIT: Upon further investigation I realized that the problem is a bit more complex:
.box {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.container {
display: flex;
}
.container > div {
width: 200px;
}
.content {
padding: 6% 8%;
}
.boxButton {
text-align: center;
}
.image {
margin-left: auto;
margin-right: auto;
}
<div class="container">
<div class="box">
<div class="image">
<img src=http://a1.mzstatic.com/us/r30/Purple/v4/47/1b/54/471b54ad-a6cf-f61e-2f33-11ffc6bd8215/icon100x100.jpeg>
</div>
<div class="content">
<div class="contentWrapper">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sapien est, tempus eget aliquet nec, suscipit vitae lectus. Sed ut convallis lorem, non tincidunt sapien.</p>
<p class="boxButton">
<button>Button</button>
</p>
</div>
</div>
</div>
<div class="box">
<div class="image">
<img src=http://a1.mzstatic.com/us/r30/Purple/v4/47/1b/54/471b54ad-a6cf-f61e-2f33-11ffc6bd8215/icon100x100.jpeg>
</div>
<div class="content">
<div class="contentWrapper">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sapien est, tempus eget aliquet nec, suscipit vitae lectus.</p>
<p class="boxButton">
<button>Button</button>
</p>
</div>
</div>
</div>
<div class="box">
<div class="image">
<img src="http://a1.mzstatic.com/us/r30/Purple/v4/47/1b/54/471b54ad-a6cf-f61e-2f33-11ffc6bd8215/icon100x100.jpeg">
</div>
<div class="content">
<div class="contentWrapper">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p class="boxButton">
<button>Button</button>
</p>
</div>
</div>
</div>
</div>
After reading the tutorials of flexboxes I do understand why it looks like this now. Is there a way with flexbox to make the text in the content wrapper come immediately after the image div but the button still at the bottom of the container?
I am able to change or add divs inside the contentWrapper, but the layout around it is fixed like that.