Monday, 30 September 2013

Centering items using CSS

Centering items using CSS

I'm having trouble centering things, I've tried table cell and the line
height trick but can't get things to work.
Here's my HTML
<li class="image-item gallery-image-item">
<i class="icon-remove"></i>
<i class="btn-comment icon-comment"></i>
<i class="btn-youtube icon-youtube-play"></i>
</li>
I'm trying to get icon-remove to sit top right in the li.
btn-comment and btn-youtube should be centered in the li, vertically and
horizontally.
The problem I am having is that the icon-remove icon is causing the
centering of the other two items to shift.

No comments:

Post a Comment