WordPress.org

Ready to get started?Download WordPress

Forums

Changing fonts in a blog using "style.css" (6 posts)

  1. LeonardLeopold
    Member
    Posted 1 year ago #

    Hi,
    I'm new to WP, however, have some working knowledge of CSS. Trying to tweak style.css (in default stylesheets) with Theme Editor. Tags added to the draft on "HTML" tab cause a momentary change to the desired font (size-wise)and then fall back to some other mode, as if overwritten by other CSS file, while switching to "visual" tab. Changes made after saving the draft are not reflected in "preview" What am I doing wrong? Thanks.
    Leo

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Switching between the visual and text editors tends to be problematic. So best advice is to stick with one or the other until you've saved a page - then you can go to the other one.

  3. LeonardLeopold
    Member
    Posted 1 year ago #

    Hi WPyogi,
    Thanks for helping, but I still could not get WP do what I wanted. I do not know in what succession the CSS files are executed, so there goes it. According to the Codex instructions I tried to insert <h>tags to modify the font size, but obviously in the wrong file, still "style.css" found in THEMES/Theme Editor. The work is done on a companion blog http://www.americaneducation.phd-central.org. Maybe there are more in-depth instructions which will put me on the right track. Thanks again
    Leo

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    I could go into a long explanation of CSS - but you probably know the basics already (top down, specificity of selectors, etc.). In WP, it can be tricky, because styles do get pulled from multiple places.... The best way to look at where a style is coming from is by using a tool such as Firebug - as it will show you exactly the style affecting a specific element - and where that style is coming from. But the key thing is to just copy the affecting CSS code to the child theme stylesheet and make the changes there - it usually does not matter where it is coming from - so long as your new style will override it. if not, you can use more selectors and/or the "!important" if absolutely necessary. Check out Firebug -- and the great info on their site.

    So if you use, say an h3 tag in the visual editor, it will pick up the size, color and whatever other styles are already set for h3 tags in the context where it is. You'd need to go change the styles in the CSS code to change that.

    Does that help or am I totally off track and telling you things you already know :)?

  5. Darin Hagre
    Member
    Posted 1 year ago #

    I found it helpful, WPyogi. Thanks!

  6. LeonardLeopold
    Member
    Posted 1 year ago #

    Hi WPyogi,

    Thanks for your input again. Very precious! I am simply trying to use WordPress as a blogging software. Up until now I used Blogger, but since I like to keep things together, and as my intuition tells me that WP is better in many ways, I tried to effect transfer of Google blog to WP. It did not work, however. I did some serious programming long time ago and am familiar with modern software techniques. Still, because of severe time constraints, I cannot involve myself in delving deeper into intricacies of programming, contrary to my inclinations. What I would like is to have a tool that can be quickly learned and used. The framework provided by WP is far superior, if I could only have a simple way to modify the fonts in the body of the blog, I would be satisfied. As it is, unfortunately, reading the WP instructions is not enough to do so. Hopefully, you or someone else can point to me which file(s) needs to be tweaked, I will try to do the rest. My host is using ver 3.4.2 of WordPress. Meantime, I will use it "as is", without the convenience of having what I want. Thanks again,
    Leo

Topic Closed

This topic has been closed to new replies.

About this Topic