如下代码怎么按钮显示在搜索况的下面,如果把display:block; 这个改成 inline的话能在右面,但如果这样的话,搜索况的图片会变形,变成普通的四方形。 还有一个问题,就是按钮只显示一半。怎样才能解决阿?<div id="btnList">
<ul>
<li><span id="listTotal">전체 직원수 : <b></b> 명</span></li>
</ul><form id="searchForm" onsubmit="return false;">
<fieldset>
<legend>검색</legend>
<label id="searchbox">
<input type="text" id="s" name="s"/>
</label>
<button class="search">검색</button>
</fieldset>
</form></div>
/** search form **/
div#btnList form {float:right; width:246px;}
div#btnList form fieldset label#searchbox {display:block; background:url(/images/bg-search.gif) no-repeat; height:21px; width:246px;}
div#btnList form fieldset label#searchbox input {background:none; border:none; outline:none; color:#666; font-size:0.9em;}
div#btnList form fieldset .search{clear:both;}
div#btnList form fieldset .search{display:inline-block; background:url(/images/bg-buttons-left.gif) }
div#btnList form fieldset .search{display:inline; background:url(/images/bg-buttons-right.gif) no-repeat right; padding:0 15px 0 0; line-height:21px;}
div#btnList form fieldset .search{margin:0 3px;}
<ul>
<li><span id="listTotal">전체 직원수 : <b></b> 명</span></li>
</ul><form id="searchForm" onsubmit="return false;">
<fieldset>
<legend>검색</legend>
<label id="searchbox">
<input type="text" id="s" name="s"/>
</label>
<button class="search">검색</button>
</fieldset>
</form></div>
/** search form **/
div#btnList form {float:right; width:246px;}
div#btnList form fieldset label#searchbox {display:block; background:url(/images/bg-search.gif) no-repeat; height:21px; width:246px;}
div#btnList form fieldset label#searchbox input {background:none; border:none; outline:none; color:#666; font-size:0.9em;}
div#btnList form fieldset .search{clear:both;}
div#btnList form fieldset .search{display:inline-block; background:url(/images/bg-buttons-left.gif) }
div#btnList form fieldset .search{display:inline; background:url(/images/bg-buttons-right.gif) no-repeat right; padding:0 15px 0 0; line-height:21px;}
div#btnList form fieldset .search{margin:0 3px;}
<div id="btnList">
<ul>
<li><span id="listTotal">전체 직원수 : <b></b> 명</span></li>
</ul>
<form id="searchForm" onsubmit="return false;">
<fieldset>
<legend>검색</legend>
<label id="searchbox">
<input type="text" id="s" name="s"/>
</label>
<a class="button search" href="#">
<span>검색</span>
</a>
</fieldset>
</form></div>/** search form **/
div#btnList form {float:right; width:246px;}
div#btnList form fieldset label#searchbox {display:inline; background:url(/images/bg-search.gif) no-repeat; height:21px; width:246px;}
div#btnList form fieldset label#searchbox input {background:none; border:none; outline:none; color:#666; font-size:0.9em;}
div#btnList form fieldset a.button {clear:both;}
div#btnList form fieldset a.button {display:inline-block; background:url(/images/bg-buttons-left.gif) no-repeat; text-decoration:none; height:21px; padding:0 0 0 15px; color:#fff; font-weight:bold;
font-size:9pt;}
div#btnList form fieldset a.button span {display:block; background:url(/images/bg-buttons-right.gif) no-repeat right; padding:0 15px 0 0; line-height:21px;}
a.button {margin:0 3px;}
这个display改成block的话,会正常显示搜索况,但是按钮会到搜索况的下面,而不是右面。
div#btnList form {float:right; width:246px;}
div#btnList form fieldset label#searchbox {display:block; background:url(/images/bg-search.gif) no-repeat; height:21px; width:246px;}
div#btnList form fieldset label#searchbox input {background:none; border:none; outline:none; color:#666; font-size:0.9em;}div#btnList form fieldset a.button:hover {color:#333;}
div#btnList form fieldset a.button {clear:both;}
div#btnList form fieldset a.button {display:inline-block; background:url(/images/bg-buttons-left.gif) no-repeat; text-decoration:none; height:21px; padding:0 0 0 15px; color:#fff; font-weight:bold;
font-size:9pt;}
div#btnList form fieldset a.button span {display:block; background:url(/images/bg-buttons-right.gif) no-repeat right; padding:0 15px 0 0; line-height:21px;}
a.button {margin:0 3px;}html代码
<div id="btnList">
<ul>
<li><span id="listTotal">전체 직원수 : <b></b> 명</span></li>
</ul>
<form id="searchForm" onsubmit="return false;">
<fieldset>
<legend>검색</legend>
<label id="searchbox">
<input type="text" id="s" name="s"/>
</label>
<a class="button search" href="#">
<span>검색</span>
</a>
</fieldset>
</form></div>