change or add css to theme from plugin

I want to add/change the CSS of my current theme from my plugin.

I’ve tried add_action and wp_enqueue_style and doesn’t work

My code:

function register_plugin_styles() {

        wp_enqueue_style( 'fh-plugin' , plugins_url( 'nf-plugin/includes/f-hide.css' ));

    }

    add_action( 'wp_enqueue_scripts', 'register_plugin_styles' );

Solutions Collecting From Web of "change or add css to theme from plugin"

I believe you need to add __FILE__ to your plugins_url() function. It may not be calling the right location. It should look like this:

add_action( 'wp_enqueue_scripts', 'wpse_238154_register_plugin_styles' );

function wpse_238154_register_plugin_styles() {
    wp_enqueue_style( 'fh-plugin' , plugins_url( 'nf-plugin/includes/f-hide.css', __FILE__ ) );
}