In a WP site developed with a custom theme, I saw that font size of the paragraph tag seems to be defined in


I have tried to change font-size to 18px in style.css located there, but now the inspector says that

is defined by a css file located at


And that the font size remains 16px.

How could I change the paragraph tag font size?

  • 2
    First off, are you working from a child theme or are you editting the theme files directly? It is advised against editting directly Secondly, it could be that the theme compiles its scss files to the final style.css in which case you should edit the font-size in those. But given the spase information it is hard to tell what is going on
    – odinp123
    Aug 20, 2016 at 11:32
  • Working on style.css, this is in the child theme. How could I work on the ' scss files to the final style.css'? I didn't find a such file on the server
    – bobrock4
    Aug 20, 2016 at 12:42
  • They are probably created in the parent theme. But the issue is probably that your child theme style is loaded before the parent styles hence overwritten. You could probably get away with using !important on your p style. But I am going to give a suggestion/answer
    – odinp123
    Aug 20, 2016 at 16:48

1 Answer 1


Since you are working on a child theme you could try the following. This requires that you have removed @import from your child themes style.css or removed the hook, that loads the parent stylesheet in your child themes functions.php.

Add this to your functions.php in the child theme:

function wp_enq_theme_styles() {

    $parent_style = 'parent-style';
    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 ) );
add_action( 'wp_enqueue_scripts', 'wp_enq_theme_styles' );

What this code does is enqueuing the parent style first and then the child style. The array part of the child-style tells wordpress that the child style is dependent on the parent style thus it is loaded after the parent style. Hence your child styles will override the parent styles.

Hope this helps.

PS. you can always read more about it here

  • How can I "remove @import from your child themes style.css or remove the hook, that loads the parent stylesheet in your child themes functions.php"?
    – bobrock4
    Aug 21, 2016 at 9:51
  • In any case '!important' in p style in 'style.css' is working now
    – bobrock4
    Aug 21, 2016 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.