Forums

changing what "large" does (4 posts)

  1. waldfield
    Member
    Posted 1 year ago #

    Currently, when I surround text with "span font-size:large" tags, it makes it a certain size. Is there a way I can change what size this is?

    (Note: I've also tried using "x-large" and "larger" tags but they bring it to that same size that "large" does.)

  2. Steffen Jørgensen
    Member
    Posted 1 year ago #

    the "large" and "larger" sets the font-size relatively to the font-size defined by CSS:
    http://www.w3schools.com/css/pr_font_font-size.asp

    If you have a paragraph with a font-size of 12px and you have a span inside that like:

    <p>this <span style="font-size:larger">is sample</span> text...</p>

    the text inside the span will (logically) be "larger" than the text outside the span.

    I'm not sure if there are specific sizes or that depends on the browser rendering the text.

    I usually do it like this:

    HTML:
    <p>this <span class="larger">is sample</span> text...</p>
    CSS:
    p{font-size:1em;}
    p.larger{font-size:1.2em;}

  3. waldfield
    Member
    Posted 1 year ago #

    Hmmm I tried putting those in my CSS, but it didn't seem to do anything. Does it matter where in the CSS I put them? I just threw them on at the end. (Sorry but I'm pretty new to this stuff.)

  4. Steffen Jørgensen
    Member
    Posted 1 year ago #

    A link to your blog/website would help a great deal.

Topic Closed

This topic has been closed to new replies.

About this Topic