呈现 HTML/ASP.NET 时按钮会换行

发布于 2024-08-31 08:52:48 字数 91 浏览 4 评论 0原文

我正在使用 ASP.NET。我有一个 html 表格。其中一个表格单元格 (td) 有两个按钮。就在最近,当它被渲染时,它正在包装按钮。谁能告诉我为什么会发生这种情况?

I am using ASP.NET. I have an html table. One of the table cells (td) has two buttons. Just recently, when it is being rendered it is wrapping the buttons. Can anyone tell me why this is happening?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别理我 2024-09-07 08:52:48

表格单元格比按钮的组合宽度窄。

在该单元格上尝试:

The table cell is narrower that the combined width of the buttons.

Try:

<td nowrap> on that cell.

伤痕我心 2024-09-07 08:52:48

尝试这个 CSS:

<td style="white-space: nowrap;">

另外,如果您想添加一些间距,请确保删除按钮之间任何不必要的空白并将其替换为  

Try this CSS:

<td style="white-space: nowrap;">

Also, make sure you remove any unnecessary white space between the buttons and replace it with   if you wish to add some spacing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文