codyhouse / codyhouse-framework

A lightweight front-end framework for building accessible, bespoke interfaces.
https://codyhouse.co/
MIT License
1.16k stars 171 forks source link

vertical align within a div #33

Closed starchild closed 5 years ago

starchild commented 5 years ago

More a question than an issue: In the framework, is there a way to vertically align say an image within a div? I can't find anything....

peiche commented 5 years ago

The easiest way would probably be to use the flex utility classes on the container. Using flex flex-center will center vertically and horizontally, while flex items-center will only center vertically.

https://codepen.io/peiche/pen/dxdbrJ

starchild commented 5 years ago

ty v much, that's just perfect!