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
    1. Advertising

  2. keyur47831

    arnie Guest

    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
     
    arnie, Aug 14, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Prakash
    Replies:
    6
    Views:
    5,037
    Prakash
    Nov 9, 2005
  2. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    Non "mobile" controls on Mobile ASPX

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Aug 17, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    673
    Steven Cheng[MSFT]
    Aug 20, 2007
  3. chen selina
    Replies:
    0
    Views:
    1,359
    chen selina
    Jul 13, 2010
  4. dawson
    Replies:
    0
    Views:
    181
    dawson
    Jul 12, 2005
  5. Eugene

    Applying new style for mobile control

    Eugene, Jul 18, 2005, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    135
    Eugene
    Jul 18, 2005
Loading...

Share This Page