Suggestion for different blog post layouts

  • Hi there,
    I am finishing off a site that another developer worked on.
    They added the CSSe below to style blog posts – it was 700px wide, but I changed it to 800px (and reduced the padding).
    But I also want to provide the client with a 2 column layout, but of course 800px is too narrow.
    But there are existing posts that work fine at the 700/800 layout (a single column)

    What would you recommend to do to provide a flexible way to have both options for the client going forward for new posts?

    TIA, Dave

    .single-post .site-inner,
    .single-post .content-area,
    .single-post article,
    .single-post .entry-content,
    .single-post .gb-container,
    .single-post .gb-grid,
    .single-post .gb-inner-container,
    .single-post .comments-area,
    .single-post #comments,
    .single-post .comment-respond {
        background-color: #f7f4ee !important;
        padding-top: 5px !important;
        padding-bottom: 15px !important;
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin: 0 auto !important;
        max-width: 800px !important;
        box-sizing: border-box !important;
    }
    
  • Hi Dave,

    If the goal is to provide two different layouts for single posts, this is the approach I would take:

    First, move the CSS above into a Hook Element, then configure the Display Rules so it applies only to the posts that require the 800px width layout.

    Next, create a separate Content Template Element for the alternative layout. In that template, design the content using a two-column structure, then assign it only to the posts that require that specific layout.

    Hope that helps!

  • Thansk Alvind,
    I’ll work on that sound good!
    Dave

  • No problem! 🙂

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