1

这是我的小提琴:http: //jsfiddle.net/arDtd/

它在除 IE7 之外的所有浏览器中都可以找到,其中标签不与其他内容并排放置,而是位于上方。

<div class="room_row">

    <div id="roomopts_2" class="jsHide"><fieldset class="form-wrapper" id="edit-room-options-2"><legend><span class="fieldset-legend">Room 2</span></legend><div class="fieldset-wrapper"><div class="hrCompact"><hr /></div><div class="form-item form-type-select form-item-adults-2">
  <label for="edit-adults-2">Adults </label>
 <select id="edit-adults-2" name="adults_2" class="form-select"><option value="1" selected="selected">1</option><option value="2">2</option><option value="3">3</option></select>
</div>
<div class="form-item form-type-select form-item-children-2">
  <label for="edit-children-2">Children </label>
 <select id="edit-children-2" name="children_2" class="form-select"><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option></select>
</div>
</div></fieldset>
</div>    </div>



div {
display: inline;
}    
.room_row {
width: 100%;
float: left;
}
.room_row fieldset.form-wrapper {
float: right;
width: 200px;
}
.form-wrapper {
display: block !important;
}
fieldset {
margin-bottom: 20px;
}
.room_row legend {
float: left;
clear: none;
}
.room_row .fieldset-wrapper {
float: left;
}
.fieldset-wrapper {
display: block;
}
hr {
display: none;
}
.room_row label {
display: none;
}

​
4

1 回答 1

0

你必须使用ie7 css hack(如果你被允许)来满足你的要求

.fieldset-wrapper {
   display: block;
   *margin-left: 70px;
   *margin-top: -20px;
}

这是最终的演示

希望这是有用的。

于 2012-12-28T12:47:32.277 回答