Created
July 2, 2012 03:41
-
-
Save ambar/3030870 to your computer and use it in GitHub Desktop.
ie7 align justify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 为兼容 ie7, 用恰当的边距代替两端对齐:可见间隙2个,实际上三个——第三个处于负边距 | |
@item-gap: floor( (960px - 245 * 3) / 2 ); | |
.list { | |
padding-bottom: 35px; | |
margin-right: -(@item-gap + 2); // 可能被取整过,保持溢出 | |
letter-spacing: -2px; | |
} | |
.item { | |
margin-top: 35px; | |
display: inline-block; | |
vertical-align: top; | |
width: 245px; | |
margin-right: @item-gap; | |
letter-spacing: 0; | |
h3 { | |
margin: 0; | |
font-size: 16px; | |
line-height: 2; | |
} | |
img { | |
display: block; | |
width: 245px; | |
height: 245px; | |
} | |
p { | |
padding: 0 1em; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment