• Resolved Digitsoft

    (@digitsoft)


    I’ve tried overriding the CSS using the plugin Simple Custom CSS and in the child theme style.css, but no luck. The only way I’ve been able to change the button alignment is to edit the /public/assets/css file directly, which I definitely don’t want to do.

    I need to override the float:left to float:center:
    .offers-for-woocommerce-make-offer-button-catalog {
    float:left;
    position:relative;
    }

    https://www.ads-software.com/plugins/offers-for-woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor angelleye

    (@angelleye)

    Using a plugin isn’t necessary. Overriding in the child theme’s style.css would be the way to do it. If you’ve done that and it’s not working then either the rule you adjusted isn’t correct, or it could be that you have caching / CDN services in play that are still loading up the original CSS.

    Please check into those things and let me know if you still have problems.

    Thread Starter Digitsoft

    (@digitsoft)

    I know a plugin isn’t necessary, but easy for quick tests.

    I copied this line from the plugin’s css file directly and just changed left to center in the child theme style.css:
    .offers-for-woocommerce-make-offer-button-catalog { float:center; position:relative; }

    This is a pre-live site and there’s no CDN or caching enabled.

    LMK if you have any ideas…

    Thanks!

    Rob

    Plugin Contributor angelleye

    (@angelleye)

    What is the URL to your site so I can take a quick look at the page with the button on it?

    Thread Starter Digitsoft

    (@digitsoft)

    I don’t want to publish here, so email sent to your service address.

    I’m still trying to figure this one out…

    Thread Starter Digitsoft

    (@digitsoft)

    I spent 8 hrs trying to figure out a way to make my css override the offer plugin css and deemed it impossible.

    My suggestions:
    Add an option to select the button alignment
    OR
    Add an option to specify an alternate button class

    I fixed it for now using this in my functions.php file. I just copied the current css file into a new file in my child theme and made my edits.

    It’s not even remotely a long term solution, but best I could come up with.

    add_action( ‘wp_print_styles’, ‘deregister_offer_plugin_styles’, 100 );
    function deregister_offer_plugin_styles() {
    wp_deregister_style( ‘offers-for-woocommerce-plugin-styles’ );
    wp_enqueue_style( ‘offers-for-woocommerce-plugin-styles’, get_stylesheet_directory_uri() .’/offer-plugin.css’ );
    }

    Hope this helps someone…

    It’s an AWESOME plugin!

    Plugin Contributor angelleye

    (@angelleye)

    Glad you got it worked out.

    We’ll certainly look into adding something like that in a future update. Thanks for the feedback!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Override CSS’ is closed to new replies.