Complete list of reasons why a css file might not be working

后端 未结 19 2371
醉酒成梦
醉酒成梦 2020-12-09 02:20

This problem is making me feel like an absolute noob.

Here is the head of my .html file:




        
19条回答
  •  旧时难觅i
    2020-12-09 02:43

    I'm using Wordpress and the stylesheet was set to enqueue to the footer

    wp_enqueue_style(
            'editor-css',
            $stylesheet_directory_uri . '/assets/css/editor.css',
            ['wp-edit-blocks'],
            null,
            true   // $in_footer
        );
    }
    

    This resulted in a media="1" attribute getting added to the tag and resulted in the stylesheet being loaded but not applied.

    Changed the parameter to false and its working now

提交回复
热议问题