WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Why can't I change the font size? (10 posts)

  1. mustafa83ravi
    Member
    Posted 4 years ago #

    Hi,

    I am trying to use the following part of my style.css file to change the font size (and if that one is successful, then maybe the font type), but no change in this code (or in the others in the same file) affects anything on my blog.

    The abovementioned code is:

    body {
      margin: 0;
      background: #fff;
      font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif;
      font-size: 62.5%;
      color: #000000;
    }

    What am I doing wrong? My blog address is http://www.fikiralemi.com

    Thank you very much in advance for your concern!

    Best regards
    Mustafa

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

    you may need to refresh your browser window with 'ctrl F5' to see your changes.
    the styles are sometimes kept in the browser cache.

  3. mustafa83ravi
    Member
    Posted 4 years ago #

    I have tried such simple things. They don't work. I guess there is a fundamental problem with the code of the theme, which I may have caused while translating the theme into Turkish.

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

    -how do you connect to the style.css?
    -are you editing it on your computer and the uploading it with ftp?
    -or are you editing in the admin - appearance - editor and then saving the changes?
    -is your style.css writable on the server?

  5. mustafa83ravi
    Member
    Posted 4 years ago #

    I am editing it in the admin editor, under appearance.

    I am sorry to say that I don't exactly know what it means for a style.css file to be writable on the server...

    But from what I can guess what you mean, I have made changes in all my wordpress theme files from the same place, i.e. the theme editor under appearance. The changes have all appeared on the blog...

    Actually, the changes are saved on the style.css file itself when I make them. But somehow the changes are prevented from affecting the real appearance of the web page. My conjecture is that there must be some code somewhere which prevents the changes from appearing on the web page...

  6. Mark / t31os
    Moderator
    Posted 4 years ago #

    It's due to other definitions in the stylesheet..

    If you want to change the content font size, then adjust the content definition in the stylesheet, ie. this bit..

    #content {
    width: 73%;
    float: left;
    font-size: 120%;
    line-height: 150%;
    display: inline;
    }

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

    ( @t31os_
    the thing is, in firefox even changing the font-size in 'body' immedeately affects the whole site.)

    could the styles be generated dynamically by a style.php for instance?

  8. Mark / t31os
    Moderator
    Posted 4 years ago #

    Yes it will do that, which is why you have to be selective about what you set define and where, unless you want an attribute to cascade down onto other elements...

    You can stop the style inheritance by forcing a definition..

    Example:

    .someexample {
      color:red!important;
    }

    The !important tells the stylesheet to allow this style to over-ride any previously set value for this attribute...

    For example if i did this...

    #some_element li {
      margin:0;
    }

    I am in effect saying that EVERY <li> element that is a child element of the element with an ID of some_element should have a zero margin... (which i may not want if i have lots of varying lists inside that element)

    Where as if i gave one list a class or ID.. and then did this...

    #some_element #mylist li {
      margin:0;
    }

    I'd then only target the <li> elements that are children of the mylist element, in HTML terms <ul id="mylist"> ...

  9. mustafa83ravi
    Member
    Posted 4 years ago #

    I have re-tried both of your advice. They do work! After changing the part of the file that is the code that t31os_ quoted and then being sure to refresh the page with Ctrl plus F5 or the refresh button as alcymyth warned me to, the changes are visible. Thank you very much!

  10. Mark / t31os
    Moderator
    Posted 4 years ago #

    Glad we could help.... :)

Topic Closed

This topic has been closed to new replies.

About this Topic