Cyber Week Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

two to three columns

Home Forums Support two to three columns

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #165745
    Jiří Borový

    Hi, I have question. How I in html and css change main page in contents at. 1th post in 1 collom. 2nd to 7th to 2 colloms. 8th to next to 3 colloms. I have child theme.

    It is could by simple, But I do not know how edit index.php and style.css

    Thanks for reply..

    Simca

    http://www.kritiky.cz/

    #165806
    Tom
    Lead Developer
    Lead Developer

    You can use this CSS selector: https://css-tricks.com/almanac/selectors/n/nth-of-type/

    So you could do something like this possible:

    .blog .type-post:nth-of-type(1) {
        width: 100%;
    }
    
    .blog .type-post:nth-of-type(2),
    .blog .type-post:nth-of-type(3),
    .blog .type-post:nth-of-type(4),
    .blog .type-post:nth-of-type(5),
    .blog .type-post:nth-of-type(6),
    .blog .type-post:nth-of-type(7) {
        width: 50%;
        float: left;
    }

    And so on – it will require some tweaking, but that should get you on your way 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.