PDA

View Full Version : Printer Friendle Pages


desiree
03-23-2011, 02:04 PM
Hi everyone

I am new to javascript and css. I use templates dwt files to create my websites. How can I add a printer friendly button to my website?
To print plain content without the images.:)

Can I use a div tag, and a php button to submit it for print.

Please can you help, I have been googling about this subject for days.

Thanx

Desiree

Corrosive
03-23-2011, 02:40 PM
Try this desiree; http://www.corrosiveonline.co.uk/tutorials_printing_web_pages.php should explain it all :)

desiree
03-24-2011, 08:04 AM
Hey there !

How do you create a separate css stylesheet for a page ????:confused:

Using the css sidebar to create a stylesheet, most of my layouts are table based.

The printer friendly article looks like a good idea I will try it out. When I can figure out how to label my tables and create a stylesheet

Thanx

Desiree

d a v e
03-24-2011, 08:30 AM
can i ask why most of your layouts are table based?

Corrosive
03-24-2011, 08:32 AM
Hi

Don't use tables for layout, use divs. Try this for starters; http://www.corrosiveonline.co.uk/tutorials_css_explained.php and have a look through some of the other articles on my site. The whole theory of CSS can be found here as well; http://www.w3schools.com/ You just have to learn it I'm afraid.

Ricky55
03-24-2011, 07:01 PM
Corrosive I don't want to get into semantics but I think it's a little misleading to say don't use tables for layout use divs. Especially to new comers.

This almost implies that you should swap tables for divs which is what we see all too often which is really no better than using tables.

Learn how to build websites using well structured semantic HTML and CSS would be better IMO.

Not being funny I just think we need o be clear on this.

Corrosive
03-24-2011, 07:14 PM
That's a totally fair point.

I just wonder if phrases like 'well structured semantic HTML and CSS' would scare more people off than it would encourage.

But yes, it is wrong to try and trivialise what good mark-up is about and I guess we should discourage the 'I can learn to build a website in a fortnight, how hard can it be?' attitude.

DWcourse
03-24-2011, 10:53 PM
I'm guilty as well but I'll try to clean up my act. Especially since HTML5 offers items like <header> and <footer> to replace generic divs

desiree
03-25-2011, 01:02 PM
It was easier to learn html with this method.

desiree
03-25-2011, 01:05 PM
Yes I have to and w3schools is where I should begin.


Thank you:roll:

Ricky55
03-25-2011, 11:25 PM
I take your point corrosive perhaps there's a nice middle ground of just well written meaningful HTML with CSS. It's just the constructing things with divs that concerned me.

By meaningful we mean that the HTML would make total sense without any CSS. I won't go into more detail as I'm typing on my iPad I'm sure your tutorial explains well what we mean.

You just see so many beginner sites with 100's of divs sometimes all absolutely positioned with class names such as div1, div2. I take great pride in the code I write the first thing I do on a site I like is look at the source. I can admire that almost as much as the design if it's really well written. Sad I know.

Cheers

DWcourse
03-25-2011, 11:37 PM
You just see so many beginner sites with 100's of divs sometimes all absolutely positioned with class names such as div1, div2. I take great pride in the code I write the first thing I do on a site I like is look at the source. I can admire that almost as much as the design if it's really well written. Sad I know.

That's usually the result of an export from an image program.

I also think you should be able to "read" the HTML and parse the site in your head. But, in the end, if it works, it works. I very rarely hear anyone say, "Did you see the hot code on that page!" But then I don't hang around with you…:grin:

domedia
03-26-2011, 12:08 AM
That's usually the result of an export from an image program. It's usually because of Dreamweaver.. :) not kidding

Corrosive
03-26-2011, 06:16 AM
the first thing I do on a site I like is look at the source. I can admire that almost as much as the design if it's really well written. Sad I know.



Probably sad by I find myself doing the same thing.

desiree
03-29-2011, 03:15 PM
Check out this site, this should work if I try embedding the javascript to create a printer button. Anyone used this site before??:rolleyes:

http://www.printfriendly.com/ (http://www.printfriendly.com/)

Corrosive
03-29-2011, 03:45 PM
Not seen that one before. Have just tried it with our site and the results look pretty good to be honest :)