Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
printing from website pages
Old 08-03-2004, 01:53 PM printing from website pages
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
I have just noticed that when you try to print out the pages of the last site i have designed that it cuts off the right hand side.

Is there any way of telling it to scroll when you print or do I need to simply plug in a printable version of the pages ???

__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
 
Register now for full access!
Old 08-03-2004, 03:09 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Although many webmasters do choose to have a separate display page for printing, it's not necessary. The W3C has this page describing how to describe the CSS definition of a printable page:

http://www.w3.org/TR/REC-CSS2/page.html

As for me, I do use printer-friendly pages and throw everything to the left and get rid of big colorful areas just because I hate when I print a page and end up getting 6 square inches of blue.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-04-2004, 06:35 AM
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
I read the link yous ent me thanks for that
Do you have an example of what this code might look like for a standard a4 sheet.
I tried portrait default. i tried specific size for page box but kept getting the same error ! Thanks
__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 08-05-2004, 10:16 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Tonya,

This is a great article that I found trying to research your answer. Very well written.
http://webdesign.about.com/cs/css/a/aa042103a.htm

One element in defining such a page is specifying that it is primarily meant for print, as in:
HTML Code:
link rel="stylesheet" type="text/css" href="print.css" media="print" /> 
As for specifying how the define the page, the W3C documentation that I linked to earlier specifies it like this:

HTML Code:
@page { size 8.5in 11in; margin: 2cm }
You'll have to replace these values for A4 dimensions. I have been unable (after quite a bit of searching) to find any meaningful examples of the usage of the CSS @page directive.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-05-2004, 01:37 PM
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
Ok I have got a new style sheet that includes some of the tags I have used & redefines them for printing eg make text black etc

I have even hidden my nav panel so it doesnt print. however I still cant get the script to wrap & not cut off on the right hand side. & although I have hidden my nav bar it still leaves the space for it.

Any ideas ?
__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 08-05-2004, 03:27 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Could you post a link to the page(s)? Maybe seeing what you're doing could help in formulating a solution.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-05-2004, 04:39 PM
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
http://www.cotswoldsbandb.co.uk/

its getting there! currently it only now misses off a few words. I have added a div area around the main section & fixed this at 100% width. I was thinking of trying 90% maybe.

Frustrating but actually I am looking forward to getting this sussed & using a print style sheet on more of the sites i look after! maybe adding a feature page about it on my site ! Once we have it working that is

What I need to do after getting print ok is to work out putting page breaks in. But I have noticed on pages with right graphic that text slides under graphic. Of course I could hide the picture but .....

cheers
__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 08-05-2004, 10:32 PM
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
I tried adding width into the @page tag & wierd thing is in Firefox, opera & mozilla it works but not in IE & lets face it lots of viewers use IE. Is it maybe because the @page thing is CSS2 & IE doesnt support that yet?
__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 08-05-2004, 11:19 PM
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
Solved
It needs @media print as an outside tag in the print css then code inside it. eg
@media print {
P {
font-family : garamond, bodoni, "times new roman", serif ;
font-size : 10px ;
}
}
In my editor the normall css comes up pink. The addition @print media{} is a very dark red color.

It works anyway !! yahoo ! defo writing an article on thsi for my site after all that work
__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Old 08-05-2004, 11:25 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Glad you got it solved, Tonya -- sorry I wasn't more (direct) help!
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-06-2004, 08:07 AM
tonya's Avatar
Ultra Talker

Posts: 485
Location: world traveller based in UK
Trades: 0
HI yup at about 3am. Thanks for pointing me in the right direction anyway ! Cheers
__________________
Tonya

::
Please login or register to view this content. Registration is FREE
::
Please login or register to view this content. Registration is FREE
tonya is offline
Reply With Quote
View Public Profile Visit tonya's homepage!
 
Reply     « Reply to printing from website pages
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53691 seconds with 12 queries