Distributing images evenly & horizontally in a Div via CSS

后端 未结 6 627
盖世英雄少女心
盖世英雄少女心 2020-12-23 13:25

I\'m having a difficult time finding specific info for my case. I\'d like to distribute 3 image thumbnails across a 940px div in order to line up with the rest of my content

6条回答
  •  不知归路
    2020-12-23 13:37

    There is an clean solution:

    http://radiatingstar.com/distribute-divs-images-equaly-line

    #container {
        text-align: justify;
    }
    #container > div {
        width: 100px; /* Declare your value. Can be in relative units. */
        display: inline-block;
        vertical-align: top;
    }
    #container:after {
        content: "";
        width: 100%;
        display: inline-block;
    }
    

提交回复
热议问题