We are using MVC5 to build a responsive website. A developer who has joined the team has pointed out that we are adding markup to our cshtml pages to support the responsive design. He thought that really we should just be adding css classes to our elements and then letting the style sheet take care of the layout.
Currently we are adding to the cshtml class sections of code around controls like.
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.TypeId)
@Html.EditorFor(model => model.TypeId)
@Html.PeritoValidationMessageFor(model => model.TypeId)
</div>
</div>
I suppose my question is - If I want a responsive design do I need to add the divs or is there some way I can apply css classes to my controls instead?
We are going to stick with Bootstrap for the responsive design and would not change the current approach unless it was relatively straight forward to do.
Thanks
Jake