How to apply External CSS to Html Helper Class Elements?
I am using DropDownList(), TextArea(), TextBox(), ListBox() in my aspx page. I want to apply External Css to it not inline CSS. And I don't want apply using Id/Class. So How to apply External CSS to Html Helper Class Element by its name?
controls added using Html Helper class converts the controls them to simple HTML elements/controls.
If you are adding
Html.Dropdownlist() it will get converted to
only at last.
So for this simply apply your css on the
and for future simply view PageSource from browser and you will come to know in which tag your control is getting converted and you can write your css for that tags...
This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here