1
並排坐在這裏是我的小提琴: http://jsfiddle.net/arDtd/飄來的div不要在IE7
它的發現在每一個瀏覽器除了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;
}
感謝您的解決方案。我會在必要時使用它,但我希望找出發生這種情況的原因,從而提高我的理解。謝謝 – Evans
出於興趣,單獨的IE7條件樣式表的margin-left和margin-top會稍微強一些嗎? – Evans
May [this](http://stackoverflow.com/questions/10020972/legend-doesnt-float-left-on-ie7)將幫助你在這方面獲得更多的清晰。 – Raju