Applying CSS on mobile controls

K

keyur47831

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..??
 
A

arnie

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
 

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,570
Members
45,045
Latest member
DRCM

Latest Threads

Top