Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS middle align (vertical) content in LI

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #257450
    kiwis
    Participant

    I have a list item, in each item I have text, another set of text with a background and border and an icon.

    I want to center align my content but it’s not working.

    Help!

    https://codepen.io/kiwis/pen/ZJLpwz

    #257451
    Beverleyh
    Participant

    I can’t see anything in your css that would be trying to vertical-align, but try this http://lmgtfy.com/?q=Vertical+align+li

    #257470
    Jamie
    Participant

    Add text-align: center to your forum-row rule in your css. Is that what you meant?

    #257488
    bearhead
    Participant

    I would remove the div around the image, and applies the .icon class directly to it. Then add vertical-align:middle to .headline, .replies, and .icon:

    https://codepen.io/kvana/pen/NvpxGv

    #257496
    Lionel
    Participant

    Did you tied using flexbox?

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