vertical centre

Permalink
I've scoured the web trying to find a way to VERTICAL centre a number of lines of styled text in a content block that has a FIXEDE height.
Many suggestions and solutions but none of them seem to work with C5.

deanhawthornthwaite
 
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Try this in your css
vertical-align: middle;
text-align:center;
PineCreativeLabs replied on at Permalink Best Answer Reply
PineCreativeLabs
Flexbox makes aligning content a lot more reliable and easy to work with. Just using vertical-align doesn't always work as expected. Learn more about flexbox here:

https://css-tricks.com/snippets/css/a-guide-to-flexbox...
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
There are several ways to achieve this, another would be..
display: table-cell;
vertical-align: middle;
text-align:center;
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
Thanks for both your suggestions, decided on using flexbox.
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
Thanks a ton for suggesting flex box, i've managed to create what i was after with a couple of exception. This is the page:http://stmatthews.je/index.php/church-life
The top two boxes on this page are flexbox, the others are standard C5.

Ive got them to stay the same size but cant find how you get the text to reduce in proportion to the screen size, so on a mobile the right box text breaks out at the bottom.
Any clues please?