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
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
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
Add text-align: center to your forum-row rule in your css. Is that what you meant?
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:
vertical-align:middle
https://codepen.io/kvana/pen/NvpxGv
Did you tied using flexbox?