WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] CSS for no background image on small devices (3 posts)

  1. gordo019
    Member
    Posted 1 year ago #

    I would like to use a custom background on desktop browsers but disable it on small devices less than600px? I have tried media queries without any luck. WP 3.5 with Twenty Twelve theme.

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    please use a child theme or a custom css plugin for the css edits;
    http://codex.wordpress.org/Child_Themes
    http://wordpress.org/extend/plugins/search.php?q=custom+css

    add the background image css for instance into a @media query like:

    @media screen and (min-width: 960px) {
      .whatever { background: ..; }
    }

    or hide a background with a @media query like:

    @media screen and (max-width: 960px) {
      .whatever { background: none; }
    }

    adjust the numbers

  3. gordo019
    Member
    Posted 1 year ago #

    Thanx Al.... That worked, yes, I am using my child theme.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic