views:

21

answers:

1

This below code is what I have donr. I need the third input field "description" to spread into width, according to size of the screen, but I don't know how to get there:

echo("<table cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">\n");
echo("<tr class=\"header\" ALIGN=LEFT>\n");
echo("<th>NUmber</th>\n");
echo("<th>Descrtiption</th>\n");
echo("</tr>\n");


echo("<form method=\"post\">\n");
echo("<tr class=\"class1\">");
echo("<td><input type=\"text\" maxlength=\"10\" size=\"6\" name=\"number\" tabindex=\"1\"></td>\n");
echo("<td><input type=\"text\" size=\"70\" name=\"description\" tabindex=\"4\"></td>\n"); 
echo("</tr>");
echo("</form>\n");

This is how i learned to do it, but I don't know how to make selector for the second column width :/

function init() {
    document.getElementById('description').style.width='100%';
}

window.onload = init;

Thank you very much!

A: 

Use <td width="100%"><input type="text" style="width:100%" name="description" tabindex="4"></td>.

vokidas
@vokidasthis does not change anthing :/
Julia
You want to make the second column and the input box fill the rest of the screen? That works for me... Maybe there are conflicts such as width set for class1 or size="70" (which you should remove).
vokidas