首页 > 解决方案 > 在输入文本旁边放置按钮

问题描述

如何在这张照片中的输入文本旁边放置按钮?

我有这个代码:

<form action='/posts/comment/{{id}}' method='POST'>
    <input class="form-control" type="text" name='comment' id='comment' placeholder="Comment as {{name}}..." aria-label="Comment as {{name}}...">
</form>

标签: htmlcsstwitter-bootstrapflaskbutton

解决方案


根据问题和屏幕截图回答。

button{
margin-left:-6px;
border-left:none;
}
<form action='/posts/comment/{{id}}' method='POST'>
    <input class="form-control" type="text" name='comment' id='comment' placeholder="Comment as {{name}}..." aria-label="Comment as {{name}}...">
    <button>Save Comment </button>
</form>


推荐阅读