Home page panes sizing

  • intricatemachine

    #5537

    Hello,

    I have created a site using graphene’s homepage panes feature that shows the 5 most recent post from a certain category on the home page. The most recent post is currently sized larger than the other 4.

    I did this by targeting the most recent post’s homepage pane id in the CSS. I have just realized that as new posts are added to this category they will not take on the larger size.

    Is there a way to assign a certain size to only the most recent post’s homepage pane and make the rest smaller? Please let me know if any of you have figured this out.

    Thank you so much!!

    URL:

    http://www.tkogfx.com/tabby

    Mod

    Kenneth John Odle

    #32161

    Yes, this is probably possible using a first-child pseudo class.

    Try something like this:

    homepage-panes:first-child {
    style info;
    }

    Not tested; I’m just pulling this off the top of my head. Play around with it and let us know if you find something that works or encounter further difficulties.

    intricatemachine

    #32162

    Hi Kenneth,

    Thanks for the suggestion. I gave it a shot but no luck so far. I used the code below

    .homepage_panes:first-child {
    width: 696px;
    margin-left: 4px;
    margin-top: 4px;
    }

    but the newest post still stays the same size as the smaller ones. I’m thinking of just keeping these 5 posts as designated home page posts by making them the only ones in the category assigned to display in the homepage panes. That way I can control which posts get featured on the homepage. Would be better if it was automated but the sizing issue seems to be making that impossible.

    Mod

    Kenneth John Odle

    #32163

    My bad. Try this:

    homepage-pane:first-child {
    style info;
    }

    It should be singular (homepage-pane) rather than plural (homepage-panes).

    Prasanna SP

    #32164

    @Ken, your second code is missing a . and you’ve separated homepage and pane with a dash. It should be a _

    .homepage_pane

    Prasanna SP

    #32165

    Nope, it doesn’t have a first-child class. Everything is dynamic.

    <div <?php graphene_grid( 'homepage_pane clearfix', 8, 5, 4, $alpha, $omega ); ?> id="homepage-pane-<?php the_ID();
    ?>">
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.