WordPress.org

Ready to get started?Download WordPress

Forums

Font sizes in a line (6 posts)

  1. anant_27
    Member
    Posted 9 years ago #

    Greetings:
    I have a query regarding font sizes in a line. I was wondering if it would be possible for me to change the size of a font in a line.
    for example:
    This is just an arbitrary text.
    I want just the arbitrary to have a font size of 12 and bold while the others have to be font size 10 and normal , with all of them being in font-family:georgia. I am able to use <div style="font-size:10px"> to change a font but that does not do it in the same line nor do tweaking the <h> tags. I also looking for XHTML 1.1 complaince.
    Is there any way I can tweak my css or my XHTML code such that i have the liberty of changing my font size, family, weight etc. just for one or 2 words in a line or paragraph.
    thanks much
    deviationz

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    .linecode {
    font-size: 12px;
    font-weight: bold;
    }
    <p class="linecode"> blah blah
    That should do it ?

  3. anant_27
    Member
    Posted 9 years ago #

    I did try using your above code, but it takes the word to the next line, just like it starting a new paragraph and then it screws up the following lines also.

  4. anant_27
    Member
    Posted 9 years ago #

    I found the solution to it
    linecode, pre
    {
    font-family: Georgia ;
    font-weight: bold;
    font-size: 14px;
    background: inherit;
    }
    blah, blah

  5. holographic
    Member
    Posted 9 years ago #

    use <span>

  6. stfox38
    Member
    Posted 9 years ago #

    In a line use <font size="10">blah, blah, blah</font> I have used this in posts and the page validates as XHTML ok. See an example at
    The Green Pelican

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.