HTML, CSS and font size (6 posts)

  1. kylec922
    Posted 3 years ago #

    Hello, I have a set CSS rule for all the font on my site. However, I wanted one page to have 2 different font sizes on it. When I use the HTML <font> tag (and yes, it's closed at the end.) It changes the font entirely on the page. Is this because WP adds the <span> tag? Is there anyway around this that will fix my problem?

  2. jack randall
    Posted 3 years ago #

    create a class and add it to each piece of text that you want to have at a different size and then create a CSS rule in you theme's style.css file

    <p class="new_font_size">text text text text</p>

    in your style.css file create the following rule

    font-size: whatever size you want it to be;

    and that should take care of that :D

  3. If you are using a good theme it will have the body class. Using this, you can set up a style for a specific page like so:

    .page-id-3 p {font-family... whatever.....}

    This body class is ideal for creating unique styles for individual pages.

  4. kylec922
    Posted 3 years ago #

    Thanks Cristine, this is a bit of what I'm looking for. How would this work if I wanted a Headline in the page to be bold however and the subsequent text below to be a different size or not bold?

  5. kylec922
    Posted 3 years ago #

    Well maybe I read that wrong, the body class will be the page "template" correct? Everything was uniform and for whatever reason the HTML font tags changed the CSS of the page. I am using a premium theme, FWIW.

  6. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    The body class will be page-id-(templateIDNumber) or if the home page, it will be home

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.