开发者

How do I place MVC view label and edit fields on the same line?

How I can get the generated view code below to place the editor-field to the right of the editor-label, on the same row? I don't want to mess with the 开发者_如何转开发generated defaults, e.g. remove the divs, as I am still in very early dev and regenerate views quite often.

<div class="editor-label">
    <%: Html.LabelFor(model => model.Suburb) %>
</div>
<div class="editor-field">
    <%: Html.TextBoxFor(model => model.Suburb) %>
    <%: Html.ValidationMessageFor(model => model.Suburb) %>
</div>


You could try floating both the .editor-label and .editor-field divs left, and having the .editor-label clear left

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜