【问题标题】:space between two text boxes两个文本框之间的空间
【发布时间】:2021-08-21 00:06:09
【问题描述】:

我有以下 radTextBoxes 代码。我想要每个文本框之间的空间。我试图将 margin-bottom css 放在其中一个文本框上,但这不起作用。以下是我的代码:

</telerik:RadPageLayout>
        <div class="componentWraper">
         <telerik:RadPageLayout  ID="OriginDept" runat="server" GridType="Fluid" >
             
        <Rows>
            <telerik:LayoutRow>
                <Columns>
                    <telerik:LayoutColumn Span="4" >
                         <telerik:RadTextBox CssClass="t-row"   runat="server" ID="txtDept" Width="100%" TabIndex="1" Label="Department *" ></telerik:RadTextBox>
                        <span style="margin-top:200px"></span>
                         <telerik:RadTextBox runat="server" ID="TbLastName" Width="100%" TabIndex="2" Label="Section/Divison *"></telerik:RadTextBox>
                         
                    </telerik:LayoutColumn>
             
                </Columns>
            </telerik:LayoutRow>
        </Rows>
    </telerik:RadPageLayout>
            </div>
        </telerik:RadAjaxPanel>

我想要 Department 文本框和 section/.division 文本框之间的空格。我试图把边距放在两者之间,但是没有用。

下面是文本框之间没有空格的页面截图:

【问题讨论】:

    标签: css flexbox telerik


    【解决方案1】:
    <telerik:RadPageLayout  ID="OriginDept" runat="server" GridType="Fluid" >             
        <Rows>
            <telerik:LayoutRow>
                <Columns>
                    <telerik:LayoutColumn Span="4" >
                         <telerik:RadTextBox runat="server" ID="TbLastName" Width="100%" TabIndex="2" Label="Section/Divison *"></telerik:RadTextBox>                         
                    </telerik:LayoutColumn>             
                </Columns>
            </telerik:LayoutRow>
            <telerik:LayoutRow style="margin-top: 200px">
                <Columns>
                    <telerik:LayoutColumn Span="4" >
                         <telerik:RadTextBox runat="server" ID="RadTextBox2" Width="100%" TabIndex="2" Label="Section/Divison *"></telerik:RadTextBox>                         
                    </telerik:LayoutColumn>             
                </Columns>
            </telerik:LayoutRow>
        </Rows>
    </telerik:RadPageLayout>
    

    您正试图将您的盒子分成单独的行。将它们放在不同的 Telerik:LayoutRows 中

    然后,您可以将 CssClass 放在底部 telerik:LayoutRow 上以在顶部留出边距,或者在我的示例中放置内联样式。

    【讨论】: