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?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #176250

    Im came across with a problem in safari that my text won’t
    center vertically inside the box.

    here is my code:

    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?

    Thank you


    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)

    jsFiddle libk

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.