• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Widgets mixup on frontpage

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Widgets mixup on frontpage

This topic is: resolved

Tagged: responsive

  • This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by [email protected].
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • January 30, 2017 at 8:06 am #200251
    [email protected]
    Member

    Hi

    I have a question in regards to fixing my website to be responsive. I have added some new widgets on the front page and they are looking fine when I load the site on a desktop. But when I access the site on a mobile device, widgets get mixed up.

    This is from my functions.php:

    genesis_register_sidebar( array(
    'id' => 'home-featured-1',
    'name' => __( 'Home Featured 1', 'minimum' ),
    'description' => __( 'This is the home featured 1 section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-featured-2',
    'name' => __( 'Home Featured 2', 'minimum' ),
    'description' => __( 'This is the home featured 2 section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-featured-3',
    'name' => __( 'Home Featured 3', 'minimum' ),
    'description' => __( 'This is the home featured 3 section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-featured-4',
    'name' => __( 'Home Featured 4', 'minimum' ),
    'description' => __( 'This is the home featured 4 section.', 'minimum' ),
    ) );

    This is from my style.css:

    .home-featured {
    /*border-bottom: 5px solid #f5f5f5;*/
    margin-bottom: 0px;
    padding: 40px 0;
    }

    .home-featured li {
    list-style-type: none;
    }

    .home-featured .widget {
    padding: 0 20px;
    }

    .home-featured p:last-child {
    padding: 0 0 24px;
    }

    .home-featured-1 {
    float: left;
    text-align: center;
    width: 25%;
    }

    .home-featured-2 {
    float: left;
    text-align: left;
    width: 100%;
    margin-top: -30px;
    }

    .home-featured-2 img {
    padding-right: 15px;
    padding-bottom: 15px;
    padding-top: 10px;
    float: left;
    margin: 0px 15px 15px 0px;
    }

    .home-featured-3,
    .home-featured-4 {
    float: left;
    width: 100%;
    text-align: left;
    margin-top: 10px;
    }
    .home-featured-3 .widget,
    .home-featured-4 .widget {
    width: 50%;
    float: left;
    }

    Let me know if you know how to crack this one.

    http://ulrikchristensen.com
    January 30, 2017 at 8:20 am #200254
    Victor Font
    Moderator

    You have to add CSS to the site's media queries for mobile responsiveness. Somewhere in the media queries you have to change the width to 100% so they stack above each other instead of being displayed in columns.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 1, 2017 at 7:46 am #200363
    [email protected]
    Member

    Hi Victor

    That really helped. But if you could help with the widgets also. They still do not stack on top of each other.

    Best Regards,
    Ulrik Christensen

    February 1, 2017 at 8:12 am #200364
    Victor Font
    Moderator

    You still have the widgets set for 50% width. Change this to 100% in your media queries.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 8, 2017 at 3:07 am #200751
    [email protected]
    Member

    Hi Victor

    I have this piece of code in my style.css:


    @media
    only screen and (max-width: 600px) {

    .home-featured-1,
    .home-featured-2,
    .home-featured-3,
    .home-featured-4 {
    width: 100%;
    }

    Shouldn't this be enough.

    /Ulrik

    February 8, 2017 at 3:12 am #200753
    Victor Font
    Moderator

    Your CSS classes in the media query have to match the CSS classes that set the dimension in the first place. The classes that set the widgets to 50% are

    .home-featured-3 .widget,
    .home-featured-4 .widget

    It's necessary to add these classes as written to the media query.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 8, 2017 at 4:23 am #200767
    [email protected]
    Member

    Hi Victor

    I just added the classes. It all works great.

    Thank you for your help.

    All the best,
    Ulrik

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble