编号导航和按钮的CSS

时间:2015-02-12 11:36:08

标签: html css

我想在同一行显示编号导航和按钮。首先编号导航,然后按钮秒。现在我将它分开了。我附上了我的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

1 个答案:

答案 0 :(得分:1)

form是一个块元素,需要更改为内联元素元素

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}