I am creating a form in HTML that will be printed, with fields that need to be written in by the recipient. Basically what I want is a single line that stretches from the end of the field label to the side of the page. Here’s how I’m doing it right now:
<table width='100%'> <tr> <td width='1%'> Label: </td> <td style='border-bottom-style:solid; border-bottom-width:1px;'> </td> </tr> </table>
This works, but there must be an easier way to do this without needing a whole table element. Any ideas?
I think your solution is better than the responses thus far. The only thing I’d change about your solution is that I’d use a css class instead of inline.
Your solution will have better alignment than using spans. Your code will look cleaner with table elements than with spans as well.
Also, you might want to consider putting in a textbox in your cell so that your users can input the information directly on the page before printing out.