• 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

Display widget contents differently on desktop / mobile?

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 › Display widget contents differently on desktop / mobile?

This topic is: not resolved

Tagged: css, widgets

  • This topic has 3 replies, 2 voices, and was last updated 2 years, 8 months ago by Anita.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 11, 2019 at 11:59 am #495439
    FutureExpat
    Participant

    Using Executive Pro theme, I have an address and phone number in the Header Right widget area. It uses Custom HTML widget, and the text is set to align right. Looks great on computer.

    But on mobile, it's pretty dorky looking. Is there an easy-ish way to display it aligned right on computer, but centered on mobile??

    Thanks.

    https://pianotex.com
    December 11, 2019 at 2:13 pm #495441
    Anita
    Keymaster

    Add this to the Additional CSS box (otherwise before the body modification in the stylesheet).

    @media only screen and (max-width: 568px) {
    .header-widget-area div h5 {
        text-align: center;
    }
    }

    Love coffee, chocolate and my Bella!

    December 11, 2019 at 2:50 pm #495445
    FutureExpat
    Participant

    Copied / pasted the above, and it generated a couple of errors. After playing around for a few minutes, I found that this worked:


    @media
    only screen and (max-width: 568px) {
    .header-widget-area div h5 {
    text-align: center;
    }
    }

    Thank you!

    December 11, 2019 at 3:04 pm #495448
    Anita
    Keymaster

    Sorry about that. I fixed mine. The code broke on the space between the div and h5.


    Love coffee, chocolate and my Bella!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 2022 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