Treehouse: Grow your CSS skills. Land your dream job.

Text-align Center Not Working on Images CSS

  • # July 12, 2013 at 7:51 am

    Hello I am not to sure if there is away to get text align center for images to line up in middle. or if best to use margin/padding percentages in css. I can align in via html but would rather do it for css so just checking if best to use the margin/padding?

    I have attached the demo

    # July 12, 2013 at 7:54 am

    For that to work, `text-align: center;` needs to be on the `ul`, and `display: inline-block;` on the `li` (remove the float).

    # July 12, 2013 at 8:28 am

    Thanks got it going now. Will use that method easier now.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.