badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Responsive layout adjustment

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #76960
    MJ
    Participant

    Hi Theme Horse, when adjusting the width of a browser between approximately 1950 and 2370px I get an undesirable layout of Featured Posts 1 and 2. The width of the divs changes from 285 to 480px which cascades Featured post 2 below the Featured slider, leaving Featured Post 1 beside the Featured Slider.

    It’s not until the width of the browser is reduced below about 1950px that Featured Post 1 cascades below The Featured Slider and the layout is fixed.

    I’d like to remove this step so that either Both Featured Posts 1 and 2 cascade when below 2370px or both remain beside the Featured slider until the width is below 1950px, whichever is easier.

    See it here: https://cvnews.com.au/

    Can you help please?
    Thank you!

    #76969

    Hi @marcus-johnson,

    We checked your Site but we didn’t understand about the layout issue on 1950px to 2370px. The layout is working very well above 1950px. But we have found the issue as you mentioned Featured posts getting beneath the Featured Banner Slider on the screen size below 1199px to 992px. This is happening just because the bootstrap CSS file is loaded after the parent theme style.css file in your Child Theme. So the style is override by Bootstrap CSS. You have to maintain all of the parent theme dependencies as this theme have more than 1 CSS file. So you need to load Bootstrap CSS before parent theme style.css and then child theme style.css.

    Thanks

    #76970
    MJ
    Participant

    Ah, I understand, thank you. I have added bootstrap loading to the Child Theme – Theme Functions (functions.php) file, all good now.

    For the benefit of others:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
     
        $parent_style = 'parent-style';
        wp_enqueue_style( 'bootstrap-style', get_template_directory_uri().'/assets/library/bootstrap/css/bootstrap.min.css', array(), '4.0.0');
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    #76975

    WOW!
    Great, Thank you :).

    Please let us know if you have any other queries regarding the theme.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.