Support » Theme: Twenty Twelve » I'd like to adjust line hight.

  • I would just like to adjust the line hight in my blog. And maby the font size. In my former theme, I could easily change that in the css. But in Twenty twelve it’s made a bit more complicated.

    I’ve just made a child theme, but when I activate it, all style is lost. So I’m guessing I dit something totally wrong.

    Can you help me on my way to reducing the line hight in the paragraphs of my site?

    thanks in advance.
    http://www.sophiewalraven.nl/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Adding the following to your stylesheet should adjust the line-height.

    .entry-content p, .entry-summary p, .comment-content p, .mu_register p {
      line-height: 1.714285714;
      font-size: 14px;
    }

    Change the values to suit your need.

    And as far as your Child Theme issue is concerned, I think, I may have to look at your child theme code to troubleshoot.

    Thank you Hareesh,

    I don’t know if it works yet, since the cild theme doestn work yet.

    this is what is on the child style.css:

    /*
    Theme Name: Twenty Twelve Child
    Theme URI: http://www.sophiewalraven.nl/twenty-twelve-child/
    Description: Twenty Twelve Child Theme
    Author: Sophie Walraven
    Author URI: http://www.sophiewalraven.nl
    Template: twentytwelve
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-twelve-child
    */

    /* =Theme customization starts here
    ————————————————————– */
    <?php

    add_action( ‘wp_enqueue_scripts’, ‘enqueue_child_theme_styles’, PHP_INT_MAX);
    function enqueue_child_theme_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
    wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array(‘parent-style’) );
    }

    1. As you might be aware, a CSS file can only hold the style references. PHP code cannot go into it. So, remove the last six lines from the file.
    2. The child theme is an extension of the parent. This means that we will have to import the styles of the parent into the child’s CSS file. So, add the following code to your stylesheet.
    @import url("../twentytwelve/style.css");
    I’ve created the child theme for you. If you wish, you may download it from the following link.

    Hareesh!
    Thank you!

    Apparently I don’t know much about css. I put the php in it because I thought that’s what they meant here: http://codex.wordpress.org/Child_Themes

    Do I put your css and the functions sheet in my child theme folder now? And put the php code in the functions.php?
    right?

    well I’ll try and see what happens.

    thank you!

    Hi,

    It did’t work. I gave up.
    But i’m back because i really don’t like so much white between the lines and the font is huge. It has to change.
    so I found the ‘edit css’ in my dashboard.

    now I put the following code in my stylesheet editor:
    /*

    .entry-content p, .entry-summary p, .comment-content p, .mu_register p {
    line-height: 1;
    font-size: 10px;
    }
    */

    and nothing.
    please can someone help me? i’m going nuts.

    Moderator stephencottontail

    (@stephencottontail)

    I can’t find that code in your stylesheet, but if it’s wrapped in /* */ in your stylesheet like it is in your post, it’s not working because those marks denote comments that are ignored by the browser.

    ow. That’s a start! thanks!

    Hi sophiewalraven! Its not as complex as you think. I’ll try to simplify the process now. Forget your functions.php for now. It is not mandatory to have it in the child theme.
    1. Create a new style.css file in your Child Theme folder and add the following lines.

    /*
    Theme Name: Twenty Twelve Child
    Theme URI: http://www.sophiewalraven.nl/twenty-twelve-child/
    Description: Twenty Twelve Child Theme
    Author: Sophie Walraven
    Author URI: http://www.sophiewalraven.nl
    Template: twentytwelve
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-twelve-child
    */
    @import url("../twentytwelve/style.css");
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    .entry-content p, .entry-summary p, .comment-content p, .mu_register p {
    line-height: 1;
    font-size: 10px;
    }

    2. Login to the admin dashboard and activate the Child Theme.
    3. Optionally you may upload the screenshot.png image file. Again this is also not mandatory.

    Hope this solves your issue.

    guys,
    you are the best.
    i finally figured it out.
    thank you so mutch!

    lalalaa!

    Glad that it worked. Cheers!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘I'd like to adjust line hight.’ is closed to new replies.