HighTechTalks DotNet Forums  

Applying CSS on mobile controls

ASP.net Mobile microsoft.public.dotnet.framework.aspnet.mobile


Discuss Applying CSS on mobile controls in the ASP.net Mobile forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?a2V5dXI0NzgzMQ==?=
 
Posts: n/a

Default Applying CSS on mobile controls - 07-25-2007 , 10:42 AM






i am facing trouble in applying stylesheets on mobile controls. I want to
give background color to a label but its not rendering. Can any one please
help me..??

Reply With Quote
  #2  
Old   
arnie
 
Posts: n/a

Default Re: Applying CSS on mobile controls - 08-14-2007 , 04:56 AM






Hi
You can make use of mobile web user control to create a style sheet
like this
1. Add a new mobile web user control to the project.
2. Add code to the file like this



<mobile:StyleSheet ID="StyleSheet1" Runat="server" >
<mobile:Style Name="style1" Font-Name="Verdana" BackColor="#0099cc"
Font-Size="normal" Font-Bold="true" ></mobile:Style>
<mobile:Style Name="Button"></mobile:Style>
</mobile:StyleSheet>
3.Save it.
4. In the mobile web form where you want to apply this style sheet add
this
<mobile:StyleSheet ID="StyleSheet1" Runat="server" ReferencePath="css
\StyleSheet.ascx"></mobile:StyleSheet>

In each mobile control there is a propery called StyleReference where
you can specify one of the style names present in the external style
sheet created above

Hope this helps
Arnie


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.