Html中让输入框input和紧接在后的按钮button在垂直方向上对齐


<table border="0px" width="360px">
    <tr><td colspan="10">
       <input id="keywordTxt" type="text"  th:value="${keyword}"/>
       <button id="searchbtn" class="btn" type="button" style="vertical-align: top;"><i class="icon-search"></i> Go</button>
    </td></tr>
...
</table>

上面红字部分 style="vertical-align: top;" 就是关键。

--2020年5月4日--


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM