Using <asp:label font-size=16px...> ist not showing size in FireFox Browser

Discussion in 'ASP .Net' started by Andreas Klemt, Nov 28, 2004.

  1. Hello,

    when I use
    <asp:label font-size="16px" text="Hello World" runat="server" />

    and run FireFox Browser the output of "Hello World" is not in Size 16px.
    The size will be ignored and I can not find it in the HTML Source Code.

    Why is it a problem with FireFox and what is the solution how to set sizes
    in Labels?

    Thanks for any help in advance
    Andreas
    Andreas Klemt, Nov 28, 2004
    #1
    1. Advertising

  2. Could you give the HTML code?

    I would use CSS instead of setting individual parameters.

    // Fredrik

    "Andreas Klemt" <> wrote in message
    news:...
    > Hello,
    >
    > when I use
    > <asp:label font-size="16px" text="Hello World" runat="server" />
    >
    > and run FireFox Browser the output of "Hello World" is not in Size 16px.
    > The size will be ignored and I can not find it in the HTML Source Code.
    >
    > Why is it a problem with FireFox and what is the solution how to set sizes
    > in Labels?
    >
    > Thanks for any help in advance
    > Andreas
    >
    Fredrik Elestedt, Nov 28, 2004
    #2
    1. Advertising

  3. Andreas Klemt

    theill Guest

    It should work fine with FireFox as well. The generated output of your
    label above is:

    <span style="font-size:16px;">Hello World</span>

    Make sure you don't hide the control somewhere in your code - or that a
    stylesheet overrides the text.

    Rgd,
    Peter Theill
    theill, Nov 28, 2004
    #3
  4. Hello Peter,

    thanks for you reply. But it doesn't work.
    Please try this:
    <asp:label id="lblTest" font-size="16px" color="red" text="Hello World"
    runat="server" />

    The output in the FireFox Browser is:
    <style id="lblTest"><font color="red">Hello World</font></span>

    Why is the font-size missing?

    Thanks for you help and any solutions in advance!
    Andreas

    "theill" <> schrieb im Newsbeitrag
    news:...
    > It should work fine with FireFox as well. The generated output of your
    > label above is:
    >
    > <span style="font-size:16px;">Hello World</span>
    >
    > Make sure you don't hide the control somewhere in your code - or that a
    > stylesheet overrides the text.
    >
    > Rgd,
    > Peter Theill
    >
    Andreas Klemt, Nov 28, 2004
    #4
  5. Andreas Klemt

    Peter Theill Guest

    I'm getting this output:

    <span id="ctl00_ContentPlaceHolder1_lblTest" color="red"
    style="font-size:16px;">Hello World</span>

    However I have to admit I'm using a beta version of VS.NET 2005 so I
    can't say they haven't fixed a bug. However try to set the "style"
    attrbute explicitly on your label. That ought to do it:

    <asp:label id="lblTest" style="font-size: 16px; color: red"
    text="Hellow World" runat="server" />

    Rgd,
    Peter Theill
    Peter Theill, Nov 28, 2004
    #5
  6. Hello Peter,
    yes you are right. I tried it with VS.NET 2005 and there it works fine but
    unfortunatly not with VS.NET 2003.

    Kind Regards
    Andreas

    "Peter Theill" <> schrieb im Newsbeitrag
    news:...
    > I'm getting this output:
    >
    > <span id="ctl00_ContentPlaceHolder1_lblTest" color="red"
    > style="font-size:16px;">Hello World</span>
    >
    > However I have to admit I'm using a beta version of VS.NET 2005 so I
    > can't say they haven't fixed a bug. However try to set the "style"
    > attrbute explicitly on your label. That ought to do it:
    >
    > <asp:label id="lblTest" style="font-size: 16px; color: red"
    > text="Hellow World" runat="server" />
    >
    > Rgd,
    > Peter Theill
    >
    Andreas Klemt, Nov 28, 2004
    #6
  7. Andreas Klemt

    Peter Theill Guest

    Ok - as a work around you should be able to set the size on the style
    e.g. using this CSS in your "<head></head>" section.

    <style type="text/css">
    #lblTest {
    font-size: 16px;
    }
    </style>

    Rgd,
    Peter Theill
    Peter Theill, Nov 28, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Newbie

    Firefox showing wrong font

    Newbie, Jul 23, 2006, in forum: HTML
    Replies:
    6
    Views:
    813
    Chris F.A. Johnson
    Jul 23, 2006
  2. Wongod
    Replies:
    2
    Views:
    707
  3. mttc
    Replies:
    2
    Views:
    2,383
    Roedy Green
    Jul 3, 2009
  4. Timo
    Replies:
    1
    Views:
    193
    Vincent van Beveren
    Jun 14, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    264
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page