[問題] 請問最右邊的搜尋要怎麼讓它置中

看板Web_Design作者時間16年前 (2010/06/07 19:50), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
如圖 http://i642.photobucket.com/albums/uu144/aloha1003/2010-06-07_194029.png
它的html結構是這樣 <div id="menu"> <!--主選單左邊界--> <div id="rounded-menu-left"></div> <!--主選單左邊界--> <!-- PRIMARY 選單名稱--> <div id="nav"> <ul class="links"> <li class="menu-302 first"> <a title="" href="/node/6">官方新聞</a> </li> </ul> </div> <!-- /PRIMARY 選單名稱--> <!--搜尋欄位--> <div id="nav-right"> <div class="container-inline" id="search"> </div> <!--/搜尋欄位--> <!--主選單右邊界--> <div id="rounded-menu-right"></div> <!--主選單右邊界--> </div> 目前的css: #menu { height: 35px; background:url(images/menu-bg.gif) repeat-x; width:952px; margin: 0 auto; } #nav { height: 35px; background:url(images/menu-bg.gif) repeat-x; float:left; } #rounded-menu-left { height: 35px; background:transparent url(images/menu-left-bg.gif) no-repeat; float:left; width:1px; line-height:0; font-size:0; } #nav-right{ line-height:10; font-size:0; float:right; border:0; } #rounded-menu-right { height: 35px; background:url(images/menu-right-bg.gif) no-repeat; float:right; width:14px; line-height:0; } 請問要怎麼讓右邊搜尋欄位 高度置中阿,改了margin、top 還是沒啥用 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.222.21.71

06/08 00:42, , 1F
試試看padding-top
06/08 00:42, 1F
文章代碼(AID): #1C3Dq4gg (Web_Design)
文章代碼(AID): #1C3Dq4gg (Web_Design)