WordPress.org

Ready to get started?Download WordPress

Forums

Can't change font-size for <p> tag in Fusion (9 posts)

  1. WhitePhantom
    Member
    Posted 4 years ago #

    Hi,

    I'm using the Fusion theme to play around with a website, and I can't seem to change the font size. The CSS specifies the following properties for 'body' :

    body{
      font-family: Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati;
    /*  font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; */
      font-size: 1.0em;
    /*  font-size: 0.8em;*/
      font-style: normal;
    /*  color: #000; */
      color: #F00;
      background: #fff url(images/main-bg.gif) repeat-x left 200px;
      min-height:100%;
      height:auto !important; /* ie6 ignores it */
      height:100%; /* fix */
      position: relative;
    }

    As you can see, I've changed the font-family and text color, and both took effect as soon as I refreshed the page. However changing the font size is having no effect.

    In 'View Source' the following is the code leading up to the main body of the page:

    <div id="mid">
    <div id="header">
    </div>
    <div id="mid-content">
    <div id="post-17" class="post-17 page hentry category-uncategorized">
    <h2 class="left">Home Page</h2>
    <div class="clear"/>
    <div class="entry clearfix">
    <p>
    <strong>
    </strong>
    <br />
    Blah blah blah
    </p>

    I've searched right through the CSS file for 'font-size', but it's mostly set in percentages (of the body font-size, I would have thought). The only two places I can find an actual setting for font-size are the above and #header h1 {font-size: 3.4em} (I've tried changing this and it does take effect after F5).

    I've gone into Fusion Settings -> User CSS Code and added a line
    body {font-size: 1em; } but again it has no effect.

    What to do??

    Many thanks,
    J.

  2. digitalnature
    Member
    Posted 4 years ago #

    I think the top "layout controls" are interfering with the css. either disable them from the theme settings, or change the font size values from header.php

  3. WhitePhantom
    Member
    Posted 4 years ago #

    Aha. Many thanks for that. I set the "Show layout controls (Aa/<>)" to No, and it used the size from the stylesheet.

    So can I allow the 'Aa/<>' setting, but set what's used for each of the font sizes? Eg, at the moment it seems to use 0.7, 0.8 and 0.95 as the three settings - can I set those defaults somewhere myself?

  4. WhitePhantom
    Member
    Posted 4 years ago #

    I re-read your reply, then set the layout controls back to Yes, went into header.php, and set the font-sizes in there - see below (I made them really large just so that I'd know for sure if it took effect...) but it didn't make any difference.

    <?php if(get_option('fusion_controls')<>'no') { ?>
       jQuery("#layoutcontrol a").click(function() {
         switch (jQuery(this).attr("class")) {
    	   case 'setFont' : setFontSize();	break;
    	   case 'setLiquid'	: setPageWidth();	break;
    	 }
    	 return false;
        });
       // set the font size from cookie
       var font_size = jQuery.cookie('fontSize');
       if (font_size == '.7em') { jQuery('body').css("font-size","1em"); }
       if (font_size == '.95em') { jQuery('body').css("font-size","1.5em"); }
       if (font_size == '.8em') { jQuery('body').css("font-size","2em"); }

    Am I on the right track at all regarding keeping the layout controls but still setting the font sizes myself?

    TIA.

  5. digitalnature
    Member
    Posted 4 years ago #

    change the values from the left side too.
    and click the "aA" link so the font-size cookie from your computer gets updated.

  6. WhitePhantom
    Member
    Posted 4 years ago #

    I tried changing the code as follows:

    // set the font size from cookie
       var font_size = jQuery.cookie('fontSize');
       if (font_size == '1em') { jQuery('body').css("font-size","1em"); }
       if (font_size == '1.5em') { jQuery('body').css("font-size","1.5em"); }
       if (font_size == '2em') { jQuery('body').css("font-size","2em"); }

    but it still doesn't make any difference on the web page. I deleted the fontSize cookie, thinking it might be something to do with that but again the font still shows up at the same small, medium and large sizes as previously.

    This is not a biggie, but it's just kinda bugging me now!

  7. digitalnature
    Member
    Posted 4 years ago #

    oh I forgot there's some code related to this in the fusion.js file, you need to change that too.

    better wait for an update, I'll add a better 'layout controls'..

  8. WhitePhantom
    Member
    Posted 4 years ago #

    Okay, thanks. Glad to hear that it's not just me being thick then!! :-)

    Speaking of updates, in the User CSS Code section of the Fusion Settings page I see that it says "Avoid modifying theme files and use this option instead to preserve changes after update". I had started playing around with theme files, modifying code in them, before I saw that. When there's an update of Fusion I presume my version won't automatically be updated - I'll have to manually update it?

  9. digitalnature
    Member
    Posted 4 years ago #

    yes, on the Themes page you can check if there's a new version and upgrade automatically.

    all changes you do to the theme files are lost on update. that's why I encourage people to use that feature. if you know css you can change almost annything related to the appearance...

Topic Closed

This topic has been closed to new replies.

About this Topic