所以我有一個問題my entrepreneur business opportunity rating matrix: 我希望單選按鈕保持在同一行。 問題是我不知道如何處理,因爲如果我爲單元格給出固定的最小寬度,我不確定它會在其他瀏覽器上正確顯示,如果單元格很大,我會鬆開對齊的單選按鈕。表的一列需要保留在一行(HTML/CSS/Javascript)
你們有一個CSS/Javascript(jQuery)技巧可以解決這個問題嗎?
謝謝
所以我有一個問題my entrepreneur business opportunity rating matrix: 我希望單選按鈕保持在同一行。 問題是我不知道如何處理,因爲如果我爲單元格給出固定的最小寬度,我不確定它會在其他瀏覽器上正確顯示,如果單元格很大,我會鬆開對齊的單選按鈕。表的一列需要保留在一行(HTML/CSS/Javascript)
你們有一個CSS/Javascript(jQuery)技巧可以解決這個問題嗎?
謝謝
這很簡單:只需添加white-space: nowrap;
到您的TD。
我會重新設計表格佈局(注意這是一個快速和污垢的解決方案)將按鈕放置在標籤下面(節省空間在更小的窗口大小)。
<tr class="even">
<td rowspan="2">Customer atlernatives</td>
<td class="col_g left-aligned">A lot</td>
<td class="col_d right-aligned">Few</td>
</tr>
<tr class="even">
<td class="col_m centered">
<form method="post" action="action" class="bz_op_val">
<input type="radio" value="4" name="38">
<input type="radio" value="3" name="38">
<input type="radio" value="2" name="38">
<input type="radio" value="1" name="38">
<input type="radio" value="0" name="38">
</form>
</td>
</tr>
一個更好的解決辦法應該是,對我說:
<tr class="even">
<td>Customer atlernatives</td>
<td>
<div class="col_g left-aligned">A lot</div>
<div class="col_d right-aligned">Few</div>
<form method="post" action="action" class="bz_op_val cleared-both-centered">
<input type="radio" value="4" name="38">
<input type="radio" value="3" name="38">
<input type="radio" value="2" name="38">
<input type="radio" value="1" name="38">
<input type="radio" value="0" name="38">
</form>
</td>
</tr>
謝謝,我神經使用此屬性... – Julien 2010-05-06 11:29:01
還是解決了我的問題,在2017年!非常感謝! :d – 2017-06-01 15:54:07