浮动对齐显示:内联问题

发布于 2024-08-13 22:06:39 字数 321 浏览 2 评论 0原文

<div style="display:inline;">

<textarea rows="10" cols="50"></textarea><br />
<div style="float:right;">remaining characters: 300</div>

它在 Firefox 或 IE 中都不起作用。文本剩余字符不在“内联”范围内,而是 100% 超出包含的 div。

完成这样的事情的最佳方法是什么,其中文本在父 div 中与之前的文本区域右对齐?

<div style="display:inline;">

<textarea rows="10" cols="50"></textarea><br />
<div style="float:right;">remaining characters: 300</div>

It is not working in either firefox or IE. The text remaining characters is not within the "inline" bounds instead goes 100% out of the containing div.

what is the best way of accomplish something like this where text is aligned right in parent div with textarea before that?

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

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

发布评论

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

评论(1

笑红尘 2024-08-20 22:06:39

试试这个。

<div style="display:inline; text-align:right; float:left;">
    <textarea cols="50" rows="10"></textarea><br />
    remaining characters: 300
</div>

Try this.

<div style="display:inline; text-align:right; float:left;">
    <textarea cols="50" rows="10"></textarea><br />
    remaining characters: 300
</div>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文