style setting that div will have the final say and not the skin file

T

Tony Johansson

Hello!

Assume I define a label in the skin file, setting font-size to Smaller in
this way.
<asp:Label BackColor="White" ForeColor="Red" Runat="Server" Font-Bold="True"
Font-Size="Smaller" />

Now I create an inline style on the div tag that look like this.
<div style="font-size: xx-large; font-family: Verdana">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>

When I run this page and look in the show source I can see this for the div
tag that is of interest for me.
<div style="font-size: xx-large; font-family: Verdana">
<span id="Label1"
style="color:Red;background-color:White;font-size:Smaller;font-weight:bold;">
Label
</span>
</div>

In the Browser I can notice that it's the style for the div that will have
the final say.
I would believe that the skin file would have the final say but that was
wrong.

So my question is how is it possible that the div will have the final say
for this font-size ?

//Tony
 
Joined
Dec 7, 2010
Messages
6
Reaction score
0
Check whether you have defined any style for span.
Also you can use style tag in label, so no need to use separate div tag.
Make clear font size specification rather than xx-large or small.
So make it like,
<asp:label ID="Label1" runat="server" style="font-size:12px" Text="Label"></asp:Label>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top