Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print the wholes input box 1

Status
Not open for further replies.

blondy

IS-IT--Management
May 7, 2002
16
AU
Hi all,

I have an input box (within a form) that I need to restrict in height to preserve screen real estate, but I want the entire contents to print. Is there any way to do this using CSS?

Thanks in anticipation...

Therese

Therese

"Time is an illusion. Lunchtime doubly so." Douglas Adams. (1952 - 2001)
 
You could set the font-size of the box using pixels:

Code:
<input type=&quot;text&quot; style=&quot;font-size:8px;&quot;>

Hope this helps,

Dan
 
Try this. Haven't tried it myself, but in theory should work:
Code:
<link rel=&quot;stylesheet&quot; href=&quot;screen.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; />
<link rel=&quot;stylesheet&quot; href=&quot;print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; />

and in the .css docs:

/* Screen.css */
textarea {
 width: 100px;
 height: 100px;
 overflow: auto;
}

/* Print.css */
textarea {
 width: 100px;
 height: 100px;
 overflow: visible;
}
This basically says that when used on the screen, textarea will have size 100px and scrollbars will appear when there's too much text. In printing, the textarea will expand. Sorry, can't try it now but the theory is good.
 
IT WORKS!!!!!

You are an absolute legend Vragabond, a star for you!!!

...Since we're on the subject... Does anyone know how to print text that you put in <a title=&quot;Blah&quot;> ?

Therese

&quot;Time is an illusion. Lunchtime doubly so.&quot; Douglas Adams. (1952 - 2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top