- This topic has 9 replies, 2 voices, and was last updated 7 years, 11 months ago by
Sakin.
-
AuthorPosts
-
April 21, 2015 at 12:35 am #56271
cblossants
MemberHi, 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 thanksApril 21, 2015 at 4:17 pm #56313Sakin
Keymaster@cblossants: It should work fine. Can you send me your site URL so that I can check in.
April 21, 2015 at 9:44 pm #56349cblossants
MemberHi, doreide.com/test_wp
ThanksApril 21, 2015 at 11:33 pm #56367Sakin
Keymaster@cblossants: I don’t see #gallery_mobile in your site. Can you let me know what are you trying to do it.
April 22, 2015 at 2:13 am #56380cblossants
MemberHi, 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
April 22, 2015 at 12:40 pm #56406Sakin
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 */
April 22, 2015 at 2:04 pm #56409cblossants
MemberGreat, now seems good!
Many thanks
April 22, 2015 at 6:29 pm #56427Sakin
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
April 22, 2015 at 7:08 pm #56431cblossants
MemberDone!
April 22, 2015 at 10:22 pm #56439Sakin
Keymaster@cblossants: Thanks 🙂
-
AuthorPosts
- The topic ‘media query in child theme’ is closed to new replies.