Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3-columns
- 3x + 2g = 700
- g stands for gap.
- #featured-post-6 article {
- width: 31.428571428571%; /* value of x */
- }
- #featured-post-6 article:nth-of-type(3n+1),
- #featured-post-6 article:nth-of-type(3n+2) {
- float: left;
- margin-right: 2.857142857143%; /* value of g */
- }
- #featured-post-6 article:nth-of-type(3n+0) {
- float: right;
- }
- 4-columns
- 4x+3g = 880
- Let's say g = 20px
- x = 205
- .below-home-featured .entry {
- border-bottom: none;
- width: 23.2954545455%;
- }
- .below-home-featured .entry:nth-of-type(4n+1),
- .below-home-featured .entry:nth-of-type(4n+2),
- .below-home-featured .entry:nth-of-type(4n+3) {
- float: left;
- margin-right: 2.2727272727%;
- }
- .below-home-featured .entry:nth-of-type(4n+0) {
- float: right;
- }
- 4n+0: 0, 4, 8...
- 4n+1: 1, 5, 9, 14...
- 4n+2: 2, 6, 10...
- 4n+3: 3, 7, 11...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement