473,327 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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

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
Nov 18 '05 #1
6 2910
Could you give the HTML code?

I would use CSS instead of setting individual parameters.

// Fredrik

"Andreas Klemt" <ak******@hotmail.com> wrote in message
news:u1**************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #2
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

Nov 18 '05 #3
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" <th****@gmail.com> schrieb im Newsbeitrag
news:11*********************@f14g2000cwb.googlegro ups.com...
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

Nov 18 '05 #4
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

Nov 18 '05 #5
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" <th****@gmail.com> schrieb im Newsbeitrag
news:11**********************@z14g2000cwz.googlegr oups.com...
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

Nov 18 '05 #6
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

Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Smith | last post by:
I created a dataTable that returns a value from a stored procedure. How would I bind that results of a query to an <asp:label>? Thank you!
5
by: Johnb41 | last post by:
I want an "order number" to be displayed more than once on my page. <script language="vb" runat="server"> ... dim ordernumber as string = "123456" page.databind() ... </script>
3
by: nick | last post by:
Is possible for server side code to access the text of <asp:label> changed by client side javascript code?
1
by: nospamjac | last post by:
Hi, Is there a way to update the text of an asp:label on a webform without refreshing the entire page? What is called by button clicks and other events that refresh a webform control? See the...
4
by: Satya | last post by:
Hi all, The following code is throwing a run time error "The server tag is not well formed. " <ItemTemplate> <asp:HyperLink Runat="server" ID="lnkFile"...
5
by: garthb | last post by:
Hello, I have a site which I've been developing locally with VS2k3 Pro. I have some browsercap information in my web.config to help identify Firefox as an upscale browser. It works great...
4
by: mark.norgate | last post by:
Why oh why does my <asp:labelrevert to its initial value, having been changed programmatically, when I click a button in a user control I have added dynamically to the page? It's EnableViewState is...
7
by: Smokey Grindle | last post by:
How can you correctly use the <labelelement in asp.net? does the label custom control corelate to this tag correctly in the same way in that if you click it it will select the tied element? thanks
8
by: gelligokul | last post by:
Hello frens i want to retrieve <asp:label> value from the code behind in c# can any one help me...
3
by: Homer J. Simpson | last post by:
I have the following stored procedure: ALTER PROCEDURE . AS BEGIN SET NOCOUNT ON; SELECT COUNT(*) FROM QUICKNOTES END ....and the following data source in my .aspx file:
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.