WordPress.org

Ready to get started?Download WordPress

Forums

CSS font size not working in wordpress?? (5 posts)

  1. sageyoung
    Member
    Posted 2 years ago #

    Hey All,

    I'm converting a static html site to wordpress. I've copied over the CSS from the static HTML into my themes CSS file.

    The font color is working on the pages in wordpress, but the CSS font size info doesn't work.

    It's all the same size text. Here's the specific CSS code...

    .textblue {
    font-family: Tahoma, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #1D5DA6;
    }

    In the page it is called out as...
    <p class="textblue" align="left">

    Am I missing something here?

    How do I use CSS to change the text size in wordpress?

    Thanks for your help

  2. Jeff Sebring
    Member
    Posted 2 years ago #

    WordPress has nothing to do with how browsers render css. It it simply an engine that prints content and html dynamically.

    I'd be willing to bet that you have another rule set with more specificity that is controlling that element.

    Try adding the parent element to your rule. Here is an example.

    #content .textblue {
        font-family: Tahoma, sans-serif;
        font-size: 18px;
        font-weight: bold;
        color: #1D5DA6;
    }

    I hope that helps.

  3. sageyoung
    Member
    Posted 2 years ago #

    Thanks for the insight.

    It tried adding #content as you show above in the CSS file. It seemed to not make the CSS work at all. Now the blue doesn't show.

    Do I need to change the way I call the CSS in the page itself?

    Currently it is called out like so...

    <p class="textblue" align="left">

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    if you want to get suggestions on your formatting/css (which primarily has nothing to do with wordpress), please post a link to your site.

    without seeing the issue live, there is no way anybody can help with your problem.

  5. Jeff Sebring
    Member
    Posted 2 years ago #

    What I gave was an example. Replace #content with an element that wraps the .textblue paragraph.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags