Applying CSS on mobile controls

Discussion in 'ASP .Net Mobile' started by keyur47831, Jul 25, 2007.

  1. keyur47831

    keyur47831 Guest

    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..??
    keyur47831, Jul 25, 2007
    1. Advertisements

  2. keyur47831

    arnie Guest

    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>
    3.Save it.
    4. In the mobile web form where you want to apply this style sheet add
    <mobile:StyleSheet ID="StyleSheet1" Runat="server" ReferencePath="css

    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, Aug 14, 2007
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.