Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #56271
    cblossants
    Member

    Hi, I have moved CSS from custom CSS to child theme, and all works well except:

    @media
    screen and (min-width: 800px)
    {
    #gallery_mobile {display:none !important}
    }
    This same media query worked as expected in the theme custom CSS, but copying and pasting in child theme, it doesn’t work
    Any ideas? Many thanks

    #56313
    Sakin
    Keymaster

    @cblossants: It should work fine. Can you send me your site URL so that I can check in.

    #56349
    cblossants
    Member

    Hi, doreide.com/test_wp
    Thanks

    #56367
    Sakin
    Keymaster

    @cblossants: I don’t see #gallery_mobile in your site. Can you let me know what are you trying to do it.

    #56380
    cblossants
    Member

    Hi, sorry I have been working on a localhost, and I uploaded a slightly older backup, however the problem remains the same but with the code below:

    /* Mobile Header */

    @media
    screen and (max-width: 800px) {#site-logo {display: none !important;}
    #site-header{padding:0 !important}}
    #mobile-header-left-menu {background-color:white !important}
    /* Nav */
    .nav-primary {background-color:blue}
    /* Full Width */
    .no-sidebar.content-width #page { width: 100% !important; }
    .no-sidebar.content-width #main { width: 100% !important; }
    /* Footer */
    #footer-content {display:none}
    #first {color:white}

    This all works OK as custom CSS, but when copied to child theme then the code


    @media
    screen and (max-width: 800px) {#site-logo {display: none !important;}

    isn’t working (but the rest is working

    Thanks

    #56406
    Sakin
    Keymaster

    @cblossants: There is problem with your child theme style.css. There is missing opening /* and closing */ before your child theme declaration. It should be as below:

    /*
    Theme Name: Catch Responsive Child Theme
    Theme URI: http://doreide.com/test_wp/wp-content/themes/catch-responsive-child
    Author: Catch Themes Team
    Author URI: http://catchthemes.com
    Description: Catch Responsive is an extremely flexible and customizable WordPress theme suitable for almost any kind of professional website. It is based on responsive design where each element has been carefully configured for perfect display on all devices and platforms. It is built in HTML5, CSS3 and WordPress Theme Customizer for real time customization. It comes with a wide variety of options so you can modify layout, styling, featured content, promotion headline, featured slider, pagination, icons, menus, breadcrumb, widgets and much more, directly from theme customizer. This theme is translation ready and also currently translated in Swedish. Check out Theme Instructions at http://catchthemes.com/theme-instructions/catch-responsive/, Support at http://catchthemes.com/support/ and Demo at http://catchthemes.com/demo/catch-responsive/
    Version: 1.0
    License: GNU General Public License, version 3 (GPLv3)
    License URI: http://www.gnu.org/licenses/gpl-3.0.txt
    Tags: black, gray, silver, white, dark, light, one-column, two-columns, left-sidebar, right-sidebar, fixed-layout, fluid-layout, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, front-page-post-form, post-formats, sticky-post, theme-options, threaded-comments, translation-ready
    Text Domain: catchresponsive
    Template: catch-responsive
    */
    #56409
    cblossants
    Member

    Great, now seems good!

    Many thanks

    #56427
    Sakin
    Keymaster

    @cblossants: Thanks and if you like Catch Responsive and support then please write in review and rating at WordPress.org https://wordpress.org/support/view/theme-reviews/catch-responsive?rate=5#postform

    #56431
    cblossants
    Member

    Done!

    #56439
    Sakin
    Keymaster

    @cblossants: Thanks 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘media query in child theme’ is closed to new replies.