使用并排布局显示编辑器标签和编辑器字段需要什么css?

CRG*_*CRG 7 css asp.net-mvc

所以默认的MVC应用程序有以下css(在Site.css中) -

/* Styles for editor and display helpers
----------------------------------------------------------*/
.display-label,
.editor-label
{
    margin: 1em 0 0 0;
}

.display-field,
.editor-field
{
    margin:0.5em 0 0 0;
}

.text-box
{
    width: 30em;
}

.text-box.multi-line
{
    height: 6.5em;
}

.tri-state
{
    width: 6em;
}
Run Code Online (Sandbox Code Playgroud)

需要进行哪些更改?谢谢

Sha*_*ean 7

这是一个CSS问题.你所寻求的是所谓的财产display: inline-block.

这样做会将元素设置为块,但不会像元素那样在元素之前和之前放置分页符block.

.display-field,
.editor-field
{
    display: inline-block;
    margin:0.5em 0 0 0;
}
Run Code Online (Sandbox Code Playgroud)