tags:

views:

136

answers:

1

Hi everyone,

I have table with 2 rows and 2 collumns,

<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>

I'd like to put all desceriptions in the left of the collumn and the buttons on the right of the collumn but the css used only works for the first column, why is that?

css

 form span.descriptionPizza {
float:left;

        }
  form input {
float:right;


      }

any help would be appriciated.

+4  A: 

Two mistakes :)

  1. in your CSS it is span.descriptionsPizza and not span.descriptionPizza (There is a missing "s").
  2. Put the form element above the table not inside the table and close it after the table.
karlcow
Thanks a lot, it works now.