I have two textboxes which uses the same class (they both need to be the same class). But I want one textbox to float in the center and the other one to be float left, at the moment they are both float left. How can I achieve this?
Below are the two textboxes:
<input type="text" name="numberAnswer" class="numberAnswerTxt" onkeyup="numberKeyUp(this)" onkeypress="return isNumberKey(event)" onChange="getButtons()" >
<input type="text" name="numberAnswer" class="numberAnswerTxt" onkeyup="numberKeyUp(this)" onkeypress="return isNumberKey(event)" onChange="getButtons()" >
Below is the css of the class=”numberAnswerTxt”:
.numberAnswerTxt{
float:left;
width:40px;
font-size:14px;
font-weight:bold;
}
why not use different id’s? something like: