将按钮放在输入文本旁边

问题描述 投票:0回答:1

我如何将按钮放置在输入文本的旁边,如 照片中?

我有这个代码。

<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>
html css twitter-bootstrap flask button
1个回答
0
投票

根据问题和截图来回答。

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>
© www.soinside.com 2019 - 2024. All rights reserved.