0

I'm displaying a lot of images. When the window is resized, I want to be able to center the number of images fits within the window. currently it aligns to the left when when the browser window is resized.

li {
    float:left; 
    display: inline-block;
    margin: 10px;
    width: 250px;
    max-width: 100%;
    text-align:center;
}

.itemS{
    max-width:1366px;   
    text-align:center;
    margin: 0 auto;
}
.itemS.itemType{
    width: 250px;
    padding:10px;
    background-color:#333;
    position:absolute;
    top:0px;
    text-align:center; 
}