0

How can i change the css class of any label or checkbox that have properties in model class and when i create a partial view i just want to change the css class of that particular label in mVC3.

Anurag Mittal
  • 39
  • 3
  • 11
  • 1
    Can you give a bit of an example from your View and your Model? – Ecnalyr Jul 03 '12 at 12:54
  • this should help: [http://stackoverflow.com/questions/10603016/extend-mvc3-razor-html-labelfor-to-add-css-class](http://stackoverflow.com/questions/10603016/extend-mvc3-razor-html-labelfor-to-add-css-class) – markpsmith Jul 03 '12 at 13:17

1 Answers1

0

You can do something like this.

<label class="textlabel">@Html.LabelFor(model => model.Property) :</label>

Defined css for that class.

.textlabel
{
    font-weight: bold;
    color: #f8971d;
    float: right;
}
alok_dida
  • 1,723
  • 2
  • 17
  • 36