In your fiddle I imagine you're talking about .social-child-row
?
Simply set it to display:block;
and text-align:center;
It contains images which are inline elements, treated effectively like text content, as such by aligning the text for the parent to center
, the images will be centered.
There are really two main ways of centering content:
1. Text Alignment (inline elements)
Set the child elements to either display:inline
or display:inline-block
, then set the parent container to text-align:center
, the children will center in the parent- depending on whatever its width
2. Margin Alignment (block elements)
If the child content is block level (display:block
) set text:align:center;
on the parent, then give the child margin:0 auto
and a width less than that of the parent