Forums

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
    Posts
  • #176250
    cyberjo50
    Participant

    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?

    Thank you

    #176252
    Paulie_D
    Member

    Your CSS is rather unnecessarily repetitive but you could use display;table-cell and vertical-align:middle

    #176265
    cyberjo50
    Participant

    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
    http://jsfiddle.net/cyberjo50/B62XX/1/

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.