Different fonts for body and entry content paragraphs?

Community Forums Forums Design Tips and Tricks Different fonts for body and entry content paragraphs?

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  MM 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #74909

    MM
    Participant
    Post count: 128

    I’m trying to get different font size for the content characters, displayed on blog preview pages (i.e. the page with many articles and a short text preview), and a different font size for the main body paragraphs on a single blog page.

    For some reason, the below code turns the preview content to 18px.

    But also, if I add !important to entry content, then the body changes.

    Any ideas CSS experts ? thks!

    .entry-content p {
    	margin-bottom: 20px;
    	margin-bottom: 1.25rem;
    	font-size: 15px;
    }
    
    body p {
    	font-family: "proxima-nova",sans-serif;
    	font-size: 18px!important;
    	font-weight: 500;
    	line-height: 26px;
    }
    #74937

    Robin
    Participant
    Post count: 318

    To target a specific page, you need to find the body class which makes it unique. If you’re using the standard Genesis blog template, you can add .page-template-page_blog-php to the front of the class you want to modify, possibly (without a link to the page in question, I’m just guessing):

    .page-template-page_blog-php .entry-content p { your different code }

    The classes you’re using are too broad, so will affect the entire site. To see what classes are applied to the page, use Chrome’s Developer Tools, or Firebug in Firefox, and look at the body tag at the top of the source code in the HTML. HTH


    I do the best I can with what I’ve got. (say hey on twitter)

    #75024

    MM
    Participant
    Post count: 128

    Robin, your guess was perfect – thank you !

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.