The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › How do i center text inside the box vertically?
Im came across with a problem in safari that my text won’t
center vertically inside the box.
here is my code: http://jsfiddle.net/cyberjo50/B62XX/
If you view the link, those text inside the box are always on the top .
I tried it in chrome,IE firefox and they all centered vertically. Is there a hack or
fix for Safari?
Your CSS is rather unnecessarily repetitive but you could use display;table-cell and vertical-align:middle
thanks Paulie. It did fix the centering but the items are not flexible anymore. it became left aligned and theres white space on the right. (safari)