2009-08-02 4 views
0

나는, 2 행과 2 Collumns는 테이블이테이블 열 내의 css float가 작동하지 않습니까?

<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> 
난 단지 사용 collumn하지만, CSS의 오른쪽에있는 collumn의 왼쪽에있는 모든 desceriptions 및 버튼을 넣고 싶습니다

가 작동 첫 번째 열, 왜 그랬지? 어떤 도움이 appriciated 될 것이다

form span.descriptionPizza { 
float:left; 

     } 
    form input { 
float:right; 


     } 

CSS.

답변

4

두 실수 : 당신의 CSS에서

  1. 가 span.descriptionsPizza하지 span.descriptionPizza (누락 된 "S"가 있습니다)입니다.
  2. 양식 요소를 표 안에 넣지 말고 표 뒤에 닫습니다.
+0

고마워요, 지금은 작동합니다. –

관련 문제