HighDots Forums  

CSS Print

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss CSS Print in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kellydigital
 
Posts: n/a

Default CSS Print - 11-07-2005 , 08:02 AM






I had an old thread
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&thre
adid=1077791&enterthread=y

but no one responded. How does everyone else generate paper documents from a
dynamic web site? Is CSS the way to go ? Or should I be using something else?

Any advice would be greatly appreciated


Reply With Quote
  #2  
Old   
Thierry | www.TJKDesign.com
 
Posts: n/a

Default Re: CSS Print - 11-07-2005 , 10:35 AM






kellydigital wrote:
Quote:
I had an old thread

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=189&thre
adid=1077791&enterthread=y

but no one responded. How does everyone else generate paper
documents from a dynamic web site? Is CSS the way to go ? Or should
I be using something else?

Any advice would be greatly appreciated
Did you Google "print styles sheet"?

--
Thierry | http://www.TJKDesign.com | CSS-P Templates + Articles:
CSS Popups, CSS 3 Column Layout, CSS Tabs, CSS Dropdown Menu,
TIP Method, Sliced Images, Clean Popup Windows, Easy Maintenance.....




Reply With Quote
  #3  
Old   
XenomorphGod
 
Posts: n/a

Default Re: CSS Print - 11-07-2005 , 10:54 AM



Printable versions of sites can be done with CSS. Further, this can be done in
two ways.

First you can link multiple style sheets and define them for screen and print
use as follows:

<link href="main.css" rel="Stylesheet" media="screen">
<link href="print.css" rel="Stylesheet" media="print">

The second method involves merging them into the same style sheet. You do this
by using @media definitions in the style sheet. For example if I wanted to
define a printer friendly version of a site that had 12pt text, I would define
the following CSS rules:

@media print {
body { background-color: #FFFFFF;
color: #000000; }
}
@media screen {
body { background-color: #000000;
color: #FFFFFF; }
}
@media screen, print {
body { font-size: 12pt; }
}

Probably for ease in writing the style sheets, I would go with individual
files rather than using a conglomerated one. That way you can have a link to a
printer-friendly version since if you used the same sheet you would probably
have to have something on the page itself saying it is printer friendly.


Reply With Quote
  #4  
Old   
Randy Edmunds
 
Posts: n/a

Default Re: CSS Print - 11-07-2005 , 10:56 AM



Yes, CSS is the way to go.

Hope this helps,
Randy


Quote:
How does everyone else generate paper documents from a
dynamic web site? Is CSS the way to go ? Or should I be using something else?


Reply With Quote
  #5  
Old   
kellydigital
 
Posts: n/a

Default Re: CSS Print - 11-07-2005 , 11:12 AM



Hi guys...thanks for your comments. I've already set up a print style sheet
.... but my screen and print options are almost identical...i want the users to
have some sort of a wysiwyg feeling..

the problem i'm running into is we want to have our footer appear on pages. so
right now I've set up a <div> with settings position:absolute; bottom: 0;
left:0;

but since the content on the page can grow or shrink (eg one invoice might
have 20 products on it, where as others will only have a few)
i need to tell it not to overlap the footer with the contents of the invoice
as well as to manage how the CSS determines what information goes to the second
page (including page counts...if there is a way), where to put the page break
if it does rollover (ie widows&orphans), etc.

Most of the google resources i've found so far only say use the media print
style sheet to hide elements you don't want to print...i haven't found any good
resources for as much detail I'm involved in.




Reply With Quote
  #6  
Old   
Lionstone
 
Posts: n/a

Default Re: CSS Print - 11-07-2005 , 12:09 PM



Well, there's a limit to what you can do. You can set a page break using
page-break-before:always or page-break-after:always, but there is no widow
or orphan control. It's either "break here", or you let the browser break
where it needs to when the page fills up. Even if you tell it "break here",
it will break sooner if it needs to.

To keep content from overflowing the footer, cancel positioning on the
footer (left:0, top:0, position:relative) and let it return to the document
flow.


"kellydigital" <kellydigital (AT) hotmail (DOT) com> wrote

Quote:
Hi guys...thanks for your comments. I've already set up a print style
sheet
... but my screen and print options are almost identical...i want the
users to
have some sort of a wysiwyg feeling..

the problem i'm running into is we want to have our footer appear on
pages. so
right now I've set up a <div> with settings position:absolute; bottom: 0;
left:0;

but since the content on the page can grow or shrink (eg one invoice might
have 20 products on it, where as others will only have a few)
i need to tell it not to overlap the footer with the contents of the
invoice
as well as to manage how the CSS determines what information goes to the
second
page (including page counts...if there is a way), where to put the page
break
if it does rollover (ie widows&orphans), etc.

Most of the google resources i've found so far only say use the media
print
style sheet to hide elements you don't want to print...i haven't found any
good
resources for as much detail I'm involved in.






Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.