It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

css to produce a print out

css to produce a print out

Postby dazz_club on Tue Jun 26, 2007 9:41 pm

hi guys i currently have a box that contains some text and i use the overflow:auto to keep the content inside.

i would some like to have a button.link that allows the user to press and it would produce a nice clean print out of the text.

at the moment when it prints it works by cutting of the text off.

cheers
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby LucasZ21 on Wed Jun 27, 2007 6:14 am

You could have some javascript like...
Code: Select all
function = prnt() {
document.textbox.print()
}


And then call it like...
Code: Select all
<a href="http://www.google.com" onclick="prnt()" </a>


I'm not sure if that will even work though..sorry if it doesn't.
Image
User avatar
LucasZ21
100+ Club
 
Posts: 195
Joined: Mon Feb 26, 2007 2:31 am
Location: Mansfield, OH

Postby knifeinback on Fri Jul 27, 2007 11:11 am

Try defining the text you're trying to print (in the scrolling box) with the document.write function, but with display none for that page only.
if you get what I mean?

I'm not sure, but it might work.
User avatar
knifeinback
100+ Club
 
Posts: 136
Joined: Fri Jul 27, 2007 10:41 am
Location: 4170: Brisbane


Who is online

Users browsing this forum: No registered users and 0 guests