CSS Re-Centering elements on wrap

后端 未结 4 504
太阳男子
太阳男子 2021-01-18 01:32

I thought this would be simple but it\'s proving to be a bit of a headache. I\'m trying to get a grid of images to re-center when the user resizes the browser and causes one

4条回答
  •  半阙折子戏
    2021-01-18 01:38

    Please add float:left to class .project-thumbnail for the browser breakpoints specific to different browser / screen/device sizes.

    .project-thumbnail{
        float:left;
        border:2px solid black;
        min-width: 269px;
        max-width: 269px;
    }
    

    Add margin: 0, auto; to following class.

    .child-wrapper
    {
        margin: 0, auto;
    }
    

    Going through the PHP code I understood that the DIV with the class name .project-thumbnail gets repeated through WHILE loop iterations.

提交回复
热议问题