<div class="w-box-header" style="text-align: right;">
<div class="footer-text">
My Support Representative
</div>
<div>
<asp:Label ID="mcr_Name" runat="server" Text="Test Joe" /><br />
<asp:Label ID="mcr_email" runat="server" Text="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4528242c29312a052228242c296b262a28" rel="noreferrer noopener nofollow">[email protected]</a>" /><br />
<asp:Label ID="mcr_phone" runat="server" Text="P: (800) 555-5555 ext. 143" /><br />
<asp:Label ID="mcr_fax" runat="server" Text="F: (555) 555-5555" />
</div>
</div>
<br>
导致标签上方/下方放置大量空间。有什么方法可以覆盖这个间距并使它们位于彼此的正下方吗?
看起来像这样:
测试乔
电话:(800) 555-5555 分机号。 143
手机:(555) 555-5555
如何像这样强制它:
测试乔
[email protected]
电话:(800) 555-5555 分机号143
传真:(555)555-5555
最佳答案
使用div,并删除BR
<div class="w-box-header" style="text-align: right;">
<div class="footer-text">
My Engagex Support Representative
</div>
<div>
<div>
<asp:Label ID="mcr_Name" runat="server" Text="Test Joe" />
</div>
<div>
<asp:Label ID="mcr_email" runat="server" Text="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d2bfb3bbbea6bd92b5bfb3bbbefcb1bdbf" rel="noreferrer noopener nofollow">[email protected]</a>" />
</div>
<div>
<asp:Label ID="mcr_phone" runat="server" Text="P: (800) 555-5555 ext. 143" />
</div>
<div>
<asp:Label ID="mcr_fax" runat="server" Text="F: (555) 555-5555" />
</div>
</div>
</div>
关于asp.net - <br> 的间距问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13506050/