Click here to Skip to main content
15,906,455 members

WhenInDoubtCodeItOut - Professional Profile



Summary

    Blog RSS
3
Debator
11
Organiser
131
Participant
0
Author
0
Authority
0
Editor
0
Enquirer
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralPrinter-friendly websites with CSS Pin
WhenInDoubtCodeItOut25-Feb-09 10:43
WhenInDoubtCodeItOut25-Feb-09 10:43 
Recently I did a little study to investigate options for a solid printing foundation from a website. I did a lot of research and had fun investigating the w3c's css standard (http://www.w3.org/TR/CSS21/page.html)[^]for alternate media types. Although I came to the conclusion that for rock solid printing, there is no alternative to PDF, I learned that there is considerable browser support for print media. With that said. the most valuable concept I gathered from my research was that it is quite easy using css to make an entire site much more printer-friendly.
Let me give my definition of printer-friendly. The ultimate would be complete control of the margins on the page and placement of all objects on the page and meaningful page breaks. Because of different browser implementations of the print media standard, this is a complete pipe dream. With that said, I consider printer-friendly to be a way to print the main content of a web page without cluttering up the printed page with web navigation or cute stuff.
Ok, enough yacking...

There are several ways to accomplish a different css application to page elements based on the media type. One can actually make 2 distinct .css files, one for web and one for print. Then in the page head create the link to each one. Another method is to include a block of css in the existing css file and enclose it in a @media print{} style rule. Either way, browsers are smart enough to use the correct css for the media it is trying to present. I found the best way to test this is by using the print preview option available in most modern browsers.

Here is an example. For a simple page with a menu block on the left and a content area on the right, we might have an html block that looks like this...

<div class = "page"><br />
    <div class = "menu"> Menuy things </div><br />
    <div class = "content">  Content Stuff </div><br />
</div>


A typical css file might set the layout for the menu to be on the left and the content in the middle using a style like this...

.page {width:500px; }
.menu {width:200px; float:left; }
.content { width:300px; }

But by adding another set of styles we can hide the menu for print media like this...


@media print
{
.page {width:7in; }
.menu {display:none; }
.content { width:7in; }
}

This style will only be applied for printing. The main differences are that the menu class has display:none; which hides that block and I use inches as units rather than pixels. I like to specify the width to avoid things that extend off the right hand of the printed page. Again, double check by using the print preview feature in your browser.

Enjoy

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.