I’m trying to achieve a layout in html that looks exactly like this when printed:
Comments: _____________________________________________ _______________________________________________________
…where the underlined portion is a single input tag of some kind — meaning it could also be a textarea or something else, as long as the user can input text and print it out.
The requirements:
- The ‘
Comments‘ text must be on the same line as the first line of input text - I cannot just put the word ‘Comments’ inside a textarea.
- I cannot use multiple text inputs
- Both lines of input should be underlined when printing
- I can’t count on the page submitting before print: I have do nearly everything client-side.
The reason is that I have to visually re-create a paper document from an outside company to be an exact match when the page is printed from a browser. This is part of an internal ‘forms’ system that pre-dates me with this company. It’s set up so these forms automatically have margins and headers adjusted in the browser, so that’s not an issue. Getting this html formatted the way I need is.
Try using a relatively positioned div, it will contain a text area along with another div positioned absolutely.
You’ll have to style the textarea a bit to get the effect you desire.