Distributing images evenly & horizontally in a Div via CSS

后端 未结 6 623
盖世英雄少女心
盖世英雄少女心 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:54

    Use the technique shown in my answer here: Fluid width with equally spaced DIVs

    Here it is with your code: http://jsfiddle.net/thirtydot/JTcGZ/

    CSS:

    #thumbs {   
        width: 540px;
        margin-top:90px;
        margin-left: auto; 
        margin-right: auto;
    
         text-align: justify;
        -ms-text-justify: distribute-all-lines;
        text-justify: distribute-all-lines;
    }
    #thumbs a {
        vertical-align: top;
        display: inline-block;
        *display: inline;
        zoom: 1;
    }
    .stretch {
        width: 100%;
        display: inline-block;
        font-size: 0;
        line-height: 0
    }
    

    HTML:

提交回复
热议问题