Site logo

Archived topic

Setting CUSTOM Responsive CSS-media max-width ranges

3 replies · Started by michael on August 23, 2020

Viewing posts 1–4 of 4

I have the latest versions of Wordpress & GeneratePress Premium.

I have a child theme made form GP-SiteLibrary-Mellow

In my style.css, I have set the Mobile media max-width:500px.

On testing I discovered there are several other media max-width's involved, I DONT WANT THOSE.
I only want media (max-width: 500px).

I cant correctly set my Mobile-HamburgerMenu Widths on Openning & Closing the Menu-Toggle-Hamburger on home page.
in MobileScreen I need to FULLY hind the ExpandedMenu untill Toggled ON, then have ExpandedMenu show flushedRight.

I checked the Chrome-ViewSourceCode & discovered a couple style tags that I didn't set:
1) style id='generate-style-inline-css' 2) style id='generate-navigation-branding-inline-css'

How do I change these values and/or remove these unwanted code blocks???

Thanks David,

Yes, you are correct, I’m trying to set when MobileFormat appears. I am also interested in when TableFormat appears, as opposed to Desktop.

I will test what you have advised.

Where do I set TabletScreen format-media triggering????

I guess Mobile Format should be triggered at MobileLandscape width 758px. Tablet Format should be triggered at TabletLandscape width (around 10 inches). Desktop is default at greater than 10 inches.

Hi there,

Not everything is controllable using these filters, unfortunately.

However, you can adjust the queries like this:

add_filter( 'generate_media_queries', function( $queries ) {
    $queries['tablet'] = '(min-width: 769px) and (max-width: 1024px)';
    $queries['mobile'] = '(max-width:768px)';

    return $queries;
} );
This archived topic is closed to new replies.