how to use css in asp.net
-
in html head part use this line of code
anujsharma
-
Hi, Consider you have a style defined in CSS file.. something like: .Style1 { font: 12pt verdana; font-weight:700; color:orange; } you can then use the cssClass like: TextBox id="TextBox1" ForeColor="Red" CssClass="Style1" You can even make use of codebehind file if you want to change it during runtime..but it will be available only for server controls. Hope this helps. Thanks Sameer Sameer
-
Hi, Consider you have a style defined in CSS file.. something like: .Style1 { font: 12pt verdana; font-weight:700; color:orange; } you can then use the cssClass like: TextBox id="TextBox1" ForeColor="Red" CssClass="Style1" You can even make use of codebehind file if you want to change it during runtime..but it will be available only for server controls. Hope this helps. Thanks Sameer Sameer
-
ya i have done in the same way just i have right clicked the added one style sheet and i have changed the back color and some properties and changed in that cssclass property to that style sheet name it will not be changed
-
If you are using thems. Create a default.css in your themes folder. You can set all your style information there.
-
Note vs2007 is horrible for css. - it is highly inefficient. & master pages/themes just don't cut it for high end css... Instead, design/create your page in Dreamweaver or other web design tool & do your vb/c# coding in vs2007. Then, you can link to an external css file as follows: This is much more efficient in terms of bandwidth.