gpt4 book ai didi

html - 用于编号导航和按钮的 CSS

转载 作者:行者123 更新时间:2023-11-28 17:16:36 25 4
gpt4 key购买 nike

我想在同一行显示带编号的导航和按钮。首先是带编号的导航,然后是按钮。现在我得到了单独的行。我附上了我的 html 和屏幕截图。

HTML

 <a href="clients.php?i=0">1</a>
<a style="padding-right:2ex;"></a>
<form method="post">
<button name="add" class="add">Add</button>
</form>

enter image description here

最佳答案

form是 block 元素,需要改成内联元素

HTML

<a href="clients.php?i=0">1</a>
<a style="padding-right:2ex;"></a>
<form method="post">
<button name="add" class="add">Add</button>
</form>

CSS

form{display:inline-block}

关于html - 用于编号导航和按钮的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28476452/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com