Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User control and css style sheet on aspx page?
Message
 
 
À
16/12/2014 18:15:09
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01612346
Message ID:
01612352
Vues:
36
>>Hi,
>>
>>Does user control placed on an ASPX page "sees" or "uses" the stylesheet on the ASPX page? In my testing it does not seem to work but maybe I am not doing something right.
>>
>>That is, say MyApp.css has a style
>>
>>.test123 {
>>   color: red;
>>}
>>
>>
>>And user control has control
>>
>><asp:Label runat="server" ID="Test" CssClass="test123">Test Text</asp:Label>
>>
>>
>>should the Test Text be in red?
>
>It should. I would check the following:
>1) Is the browser using a cached copy of your stylesheet? Refresh the page to ensure the latest version is used.
>2) Check the outputted html. Verify that the class attribute is set.
>3) Check the css file that the browser is actually using. Verify your class is in there and has the color set.
>4) Use your browser's developer tools to ensure that the style is being applied to that element.

Excellent suggestions. I will follow up on all of them. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform