WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] Hide widget in mobile (6 posts)

  1. AmpersandBooks
    Member
    Posted 1 year ago #

    Hi there,

    I put a widget area in the header to display the logo, as in :

    http://testing.ampcommunity.com

    In the mobile view the logo is underneath the header and disproportionately sized. I'd like to just hide it altogether in mobile view or, alternatively, hide the header image so the page just has the logo at the top.

    Any suggestions on how to do this?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    alternative

    In your Child Theme style.css file, add this;

    @media screen and (min-width: 480px) {
     #masthead hgroup ~ a {
      display: none;
     }
    }
  3. AmpersandBooks
    Member
    Posted 1 year ago #

    Thanks for that, but that code seems to hide in the desktop and show it in mobile. I've already adjusted the width in the child theme. Could that be causing some conflict?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Oops, maybe try this;

    @media screen and (max-width: 480px) {
     #masthead hgroup ~ a {
      display: none;
     }
    }

    Replacing min with max.

  5. AmpersandBooks
    Member
    Posted 1 year ago #

    You, sir, are a scholar and a gentleman.

  6. AmpersandBooks
    Member
    Posted 1 year ago #

    Resolved

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic