I have the following HTML
<html xmlns='http://www.w3.org/1999/xhtml' > <head runat='server'> <title></title> <style> .box { border:solid black 1px; padding:0px; margin:0px; } </style> </head> <body> <form id='form1' runat='server'> <input class='box' style='width:300px;' /><br /> <input class='box' style='width:150px;' /> <input class='box' style='width:150px;' /><br /> <input class='box' style='width:100px;' /> <input class='box' style='width:100px;' /> <input class='box' style='width:100px;' /> </form> </body> </html>
The idea is that the textboxes should finish pixel perfect on the right hand side.
I will eventually add spacing on rows 2 and 3 enlarging the widths to compensate, but for the moment I would like to get this simple sample to render.
So how can I remove the margins of these textboxes such that the align properly?
They’re not lining up because of the whitespace between them.
If you were to remove all the newlines and tabs between the
<input>elements, it would display as you want.