我花了更多的時間比我曾經關心承認嘗試修復這個愚蠢的錯誤。我有一個顯示在某些內容左側的表單。它在寬而窄的屏幕上看起來不錯,但是在平板寬度上(它覆蓋770到950之間),右側的內容與表單域重疊。使用響應式Twitter內容重疊水平表單的麻煩引導程序
我是否在我的標記中缺少某些內容以正確使用Twitter Bootstrap,或者是否需要使用斷點添加一些自定義樣式來修復它?看起來固定的像素寬度導致了在bootstrap.css中定義的問題。這些寬度屬性不應該使用%,因爲我使用的是流體響應佈局?
<div class="container-narrow">
<div class="content">
<div class="row-fluid">
<div class="span5">
<form class="form-horizontal" id="applies-Step1-form" action="/" method="post">
<div class="control-group">
<label class="control-label required" for="Step1_email">Email <span class="required">*</span></label>
<div class="controls">
<input size="60" maxlength="255" name="Step1[email]" id="Step1_email" type="text" />
</div>
</div>
<div class="control-group">
<label class="control-label required" for="Step1_home_zip">Home Zip <span class="required">*</span></label>
<div class="controls">
<input size="5" maxlength="5" name="Step1[home_zip]" id="Step1_home_zip" type="text" />
</div>
</div>
</form>
</div>
<div class="span7">
<div class="promo-btm">
<h2>Heading 2</h2>
<ul class="checks">
<li>Bullet One</li>
<li>Bullet Two</li>
</ul>
</div>
</div>
</div>
</div>
</div>
見附件截圖爲bug或者你可以用我自己fiddle重現。
如果有人能幫助指出一種方法來解決這個問題,我會非常感激!
我明白你的意思了。有無論如何使用Bootstrap的核心風格來解決這個問題,還是我需要編寫一堆包含不同寬度的自定義CSS來適應媒體樣式? – Cofey
另外,我不需要它給左邊標籤的所有空間。我還希望它們是左對齊的,但是當我添加水平形式的類時,它們使它們右對齊。 – Cofey
如果你想使用橫向格式,你可能需要使用大量的表單佔用的空間(我不是設計師,所以我認爲看起來更好;-)你可以玩設置spanX類在你的表單元素上,但我還沒有找到任何內置的方式來做你想要的。 – thebjorn