Style asp.net controls with CSS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bobby Edward

    Style asp.net controls with CSS

    Is it possible to stype the asp.net controls (asp:Login, asp:GridView,
    asp:FormView; asp:DropDownLis t, etc...) with a standard css file?

    Any suggestions?

    Thanks...


  • Nathan Sokalski

    #2
    Re: Style asp.net controls with CSS

    I don't see why not. How are you defining the style rule in the css file
    (what type of selector are you using)? If you are using a class selector for
    the style rule, then all you should need to do is set the CssClass property.
    However, because some controls do not simply generate one tag (such as
    GridView, FormView, Login, and several others), you may want to look at what
    tags are generated to determine where to put the CssClass property, you may
    often need to put it in a control that is in the template used by the
    control, or sometimes certain controls have an extra property for the style
    of a certain part. But two of the key things that you can do are look at
    what is generated so you know what html tags you are dealing with, and you
    can also use the css child selectors in your css file to help when you only
    have the opportunity to assign a value to one CssClass property. Just fool
    around with these options and you can usually find a way to do it if it can
    be done with css. Good Luck!
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。


    "Bobby Edward" <bobby@nobody.c omwrote in message
    news:eEvwPd5GJH A.1156@TK2MSFTN GP05.phx.gbl...
    Is it possible to stype the asp.net controls (asp:Login, asp:GridView,
    asp:FormView; asp:DropDownLis t, etc...) with a standard css file?
    >
    Any suggestions?
    >
    Thanks...
    >

    Comment

    Working...