0

I have this code but I can't figure out how to align it to the very center of the div, someone could help me? thanks

HTML:

<div id="network-icons">
   <div id="container" class="clearfix">

     <ul class="clearfix">
        <li>
            <img src="images/icon.svg"/>
        </li>
        <li>
            <img src="images/icon.svg"/>
        </li>
        <li>
            <img src="images/icon.svg"/>
        </li>
        <li>
            <img src="images/icon.svg"/>
        </li>
    </ul> 

   </div>
</div>  

the css and the rest here: DEMO

Also the image is 30x30 pixels, just in case:) thanks guys!

Eugenio
  • 489
  • 3
  • 17

1 Answers1

0
#yourID {
    display: table;
    margin: auto;
}

This will make your any html element at the center of the div.

"#yourID" could be 'ul', or '.container' or something else

Ahmad Sharif
  • 4,141
  • 5
  • 37
  • 49