I don’t know Flex well enough to get this to work. Basically I have three round buttons with 2-3 lines of centered, vertically aligned text in each http://satisfill.com/wp2023/tester/. How to get them to appear in a centered row? I tried putting this on each button, which worked, but then they were stacked on top of eachother:
display: flex;
flex-direction: column;
justify-content: center;
This was another approach, which works but the text is not vertically aligned.
https://jsfiddle.net/plushdesign/pf7nv9a5/6/
<div class="block">
<div class="centered">
<p>vertical on <br>pseudo huehue <br>lol wpizdu</p>
</div>
<div class="centered">
<p>vertical on <br>pseudo huehue <br>lol wpizdu</p>
</div>
<div class="centered">
<p>vertical on <br>pseudo huehue <br>lol wpizdu</p>
</div>
</div>
.block {
text-align: center;
background: #c0c0c0;
border: #a0a0a0 solid 1px;
font-family:Helvetica;
}
.block:before {
content: ' ';
display: inline-block;
height: 100%;
vertical-align: middle;
text-align: center;
}
.centered {
display: inline-block;
vertical-align: middle;
border: #a0a0a0 solid 1px;
background: #f5f5f5;
height:140px;
width:140px;
border-radius:50%;
}
Thank you!
2
Answers
so for some reason they don't display inline in context: http://satisfill.com/wp2023/fakingit/
I used this as the css:
Apply Flexbox to both the container and the circles