2009-08-02 5 views
0

私はcollumnの右側にcollumnの左ボタンですべてのdesceriptionsを入れたいのですが、唯一の使用CSSがのために働く2行と2 collumns、テーブル列内のcss浮動小数点は機能しませんか?

<table> 
<tr> 
<td> 
<form> 

    <span class="descriptionsPizza">EXTRA CHEESE</span> 
    <input name="minus1" type="button" class="button minus" id="minus1" value=" - " /> 
    <input name="textfield1" type="text" id="textfield1" class="valfield" size="2" maxlength="2" value="0" /> 
    <input name="add1" type="button" class="button add" id="add1" value=" + " /> 

</td> 

<td> 

    <span class="descriptionsPizza">HAM</span>  
    <input name="minus2" type="button" class="button minus" id="minus2" value=" - " /> 
    <input class="valfield" name="textfield2" type="text" id="textfield2" size="2" maxlength="2" value="0"/> 
    <input name="add2" type="button" class="button add" id="add2" value=" + " /> 

</td> 
</tr> 

<tr> 

<td> 
    <span class="descriptionsPizza">MUSHROOMS</span> 
    <input name="minus3" type="button" class="button minus" id="minus3" value=" - " /> 
    <input class="valfield" name="textfield3" type="text" id="textfield3" size="2" maxlength="2" value="0"/> 
    <input name="add3" type="button" class="button add" id="add3" value=" + " /> 
</td> 

<td> 
    <span class="descriptionsPizza">PINEAPPLE</span> 
    <input name="minus4" type="button" class="button minus" id="minus4" value=" - " /> 
    <input class="valfield" name="textfield4" type="text" id="textfield4" size="2" maxlength="2" value="0"/> 
    <input name="add4" type="button" class="button add" id="add4" value=" + " /> 
</form> 

</td> 
</tr> 
</table> 

を持つテーブルを持っています最初のコラム、それはなぜですか?

CSS

form span.descriptionPizza { 
float:left; 

     } 
    form input { 
float:right; 


     } 

任意のヘルプはにappriciatedされるだろう。

答えて

4

つのミス:)あなたのCSSで

  1. それはspan.descriptionsPizzaなくspan.descriptionPizza(不足している "s" はあります)です。
  2. フォーム要素をテーブルの上にないテーブルの上に置き、テーブルの後に閉じます。
+0

ありがとう、それは今動作します。 –

関連する問題