Need help? Check out our Support site, then


Changing font-size

  1. Hello, could you plz help me:

    I have the custom css upgrade with the "kubrick" theme from Michael Heilemann.
    I can change everything with the CSS-Editor but the font-size attribute in classes.

    Font color, underlining, bold is all working in my class except the "font-size".

    In the CSS-Editor I wrote this code:

    p.Termine441 {
    font-weight:bold;
    font-size:xx-large;
    }

    In my post in HTML view, I wrote this:

    <p class="Termine441">This is some text in a paragraph</p>

    As I said, bold works, text color works (I've tried it out), the only thing that won't work is the
    font-size. Ive tried it with percentage, with xx-large, with 2.0em and every possible settings, but
    the font-size always remains the same when i preview my post (article preview button).

    Please tell me what I'm doing wrong with the font-size.

    Thx in advance for your help,
    cu30000

  2. A link to your blog would be a good start...

  3. hm..exactly what font is it that you want to change?
    What part of the blog?

  4. I wanted to create a custom class called Termine441 in my stylesheet. So that when I write a new article, I can use this class for certain paragraphs in my article.

    like:

    hello bla bla bla
    today i want to write about
    <p class="Termine441">Creating custom classes for paragraphs with different font-size</p>
    You need the css upgrade and then go to the css-editor and write this code:
    p.Termine441 {
    font-weight:bold;
    font-size:xx-large;
    }
    The result is a bigger paragraph whenever you are using this class in your posts.

    -----------------

    So I wanted to create some classes for certain font-sizes,colors, backgrounds etc...

  5. I'd be very careful about inline formatting. It will be a mess should you decide to change theme. Why not use the formatting available in the editor?

    If what you did doesn't work, try adding the font, and use em.

    font-family: verdana;
    size: 2em;
    color:red;
  6. localbusinessguide: yes in 1 post (draft) that isnt published yet, and that im just using to play around with the css upgrade and css classes to test.

    boblets: I tried it with your code but it still doesnt work. The color is red, but the size of my font wont change to 2em.

    I dont want to use the formatting available in the editor. I bought the css upgrade to be fully able to create my posts with all kinds of different fonts and with all my creativity.

    And the good thing about css classes is, that they save time. You only write them once in your stylesheet, and then use them as often as you want. with the editor you have to do the same formatting-work over and over again, with classes only 1 time.

    Please help me how I can change my font size in my css class!

  7. In the back of my mind, I'm remembering something that you have to do in the html to get this to work. Something related to <div> in the widget.

  8. OK, it took some looking but I found this. I think what you have to do is use the <div class = blah> to define the class and then put the other stuff in CSS.

    Or maybe I'm completely off base :(

  9. vivian- I think this should work, in theory. I don't think s/he means to put it in widgets?

    cu30000 - I'm taking a look at your css, but my first guess is that you have an overriding statement in your css somewhere.

  10. But since we can't access the HTML files, that appeared to be the only way to alter the HTML.

  11. ermm..now I am lost, vivian. people do inline css formatting all the time, no?

  12. Yes, but sometimes that isn't enough. Sometimes, you actually have to change the HTML in order to make it work. (A lot of the CSS stuff I have read assumes that you have access to the HTML files, which, of course, we don't here.) I've seen a number of times that the CSS gurus have recommended using a text widget (which, of course, accepts HTML) to get around that.

  13. Ok, fair enough - I shall stop interferring :-)
    Yes, access to the html/php would give you more options, of course, but since the font changed colour, it seems to me that this should be pretty straightforward.
    I could be wrong, though.

    cu30000 - regardless of my ignorance of how wordpress works with css, your stylesheet seems to be doubled, in some way. I find the same selectors twice, and not all with the same content. This could mess up things for you, and some selectors will override others depending on where it is placed. You need to fix that first - else you will have no idea why one thing works and another doesn't.

  14. I could be totally off base here, as I know very little about CSS, and I don't have the CSS upgrade like you do. I'm much more familiar with HTML and javascript; however, I was able to change the text-font-size for each of my individual posts by using the following CSS code: <span style="font-size: small;"> or <span style="font-size: x-small;">. This seems to work for my posts, although I usually write them using the good 'ole HTML view.

    Anyway, when I was first trying to understand how to change the font-size for my posts, I came upon this website: http://psacake.com/web/jw.asp, which is where I finally learned how to change the font-size with success. Moreover, the website does seem to have some relatively good CSS information contained within it; but then again, like I said, I don't know very much about CSS.

    Hope something within this comment helped .... Best Regards

  15. thx a lot people for all your help, the solution with the div-class worked it looks like this now:

    in css editor i wrote:

    .mytgedd {
    font-family:verdana;
    font-size:2em;
    color:red;
    }

    in my article in html i wrote:

    <div class="mytgedd"><p>
    Your tagline here
    </p></div>

    Result is a red verdana 2em font.

    thx a lot to all people who were trying to help me :-)

    -----------------------------
    ANOTHER QUESTION:

    boblets wrote: cu30000 - regardless of my ignorance of how wordpress works with css, your stylesheet seems to be doubled, in some way.

    Where do you see my stylesheet? And could it be that since i was playing around in css-editor, that since i saved my stylesheet a lot with the radio button option "Add to existing style sheet theme" that every time i saved my style sheet, the code was added every time to my style sheet so that i now have like hundreds of p.Termine441

    And if so, how can i delete the p.Termine441 entries in my stylesheet.

    I've searched in http://ojamas.wordpress.com/wp-content/themes/default/style.css
    but there werent any of my p.Termine441 entries, so i guess there is a 2nd custom stylesheet.css that is pretty much messed up now because of my playing around?

    Best Regards, cu30000

  16. haha! I simply forgot the "size" - hehee.
    I am very happy it works. Happy for you, and happy for my understanding of the whole thing.

    Well, the stylesheet I look at, is the one active through your site. I go to your site, open the sourcecode, find the address for the css in the header, and paste it into a new browswer window.

    <link rel="stylesheet" href="http://s.wordpress.com/wp-content/themes/default/style.css?m=1216490274a" type="text/css" media="screen" />

    yes, I couldn't find the termine either, but I didn't look too hard when I saw some things doubled. I have not the faintest idea why that would be, but I am not too familiar with the theme either. You can call the selectors whatever you want.

  17. Glad to know that the <div class> thingee worked :)

    boblets - you may want to install the developer's toolbar for Firefox (if you are using FF) to make looking at CSS much easier. The way you're doing it is too much work for me :)

    The reason you are seeing what appear to be doubled items is because of the way the CSS thing works here (I can't say it works that way everywhere): when you add to the style sheet, the original stuff is there as well as the additional stuff. According to the instructions at the top of the CSS forum, CSS processes the last instruction. So when you are just changing one item - say the font - in an element and the rest of the stuff is OK, you only have to enter that one piece.

    Hope that makes sense.

  18. I have the toolbar, I just don't use it much... when I really do css, I do it other ways and other places- -hard to teach old dogs new tricks!

    I'll have a look at that thingie at the top of the forum.. hehe. Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic