Centering items using CSS

Would someone be able to explain to me what CSS I can use to center the social media links at the bottom of this page? (the ones that are outlines in green) I’ve been fiddling around with text-align, and margin:auto; and I can’t quite seem to figure it out.

Centering elements on browser never gets old.

To horizontally center a Block element, use margin: 0 auto

To horizontally center a inline-block and inline element, use text-align: center on the parent of the element you would like to center.

For your case, you will use text-align: center on the <div>. This will apply centering to all inline-block and inline element inside <div>. Using Dev Tools, check <li> gets centered, not the <ul> as <ul> is a block element.

1 Like

Hey like @ivanyapeter said, you need to center via text-align: center and display: inline-block;

like this:

You also forgot some brackets and i changed the last paragraph to a list-item and wrapped
your lists in divs, so its easier to center the 2 rows separately.

greets f