Print without ads

Print without ads

am 30.05.2007 07:21:14 von littleboyblu87

My website is a free one that places ads on the top of the web page.
Is there a way to provide a print option so that users can print the
pages without the ads?

Re: Print without ads

am 30.05.2007 07:35:07 von dorayme

In article
<1180502474.289805.174760@o5g2000hsb.googlegroups.com>,
"Mike S." wrote:

> My website is a free one that places ads on the top of the web page.
> Is there a way to provide a print option so that users can print the
> pages without the ads?

Take a look at:

http://alistapart.com/stories/goingtoprint/

--
dorayme

Re: Print without ads

am 30.05.2007 08:59:58 von dorward

On May 30, 6:21 am, "Mike S." wrote:
> My website is a free one that places ads on the top of the web page.
> Is there a way to provide a print option so that users can print the
> pages without the ads?

Since your agreement with your hosting provider almost certainly
forbids removing the adverts, it is very likely that your only
reasonable option is to switch to better hosting.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: Print without ads

am 30.05.2007 10:42:15 von dorayme

In article
<1180508398.631947.214760@k79g2000hse.googlegroups.com>,
David Dorward wrote:

> On May 30, 6:21 am, "Mike S." wrote:
> > My website is a free one that places ads on the top of the web page.
> > Is there a way to provide a print option so that users can print the
> > pages without the ads?
>
> Since your agreement with your hosting provider almost certainly
> forbids removing the adverts, it is very likely that your only
> reasonable option is to switch to better hosting.
>

I had thought, in my reply, it was ok to include a print style
sheet but, of course (!), this is probably unlikely to work on
such hosting.

--
dorayme

Re: Print without ads

am 30.05.2007 15:01:23 von Bergamot

dorayme wrote:
> In article
> <1180508398.631947.214760@k79g2000hse.googlegroups.com>,
> David Dorward wrote:
>
>> On May 30, 6:21 am, "Mike S." wrote:
>> > My website is a free one that places ads on the top of the web page.
>> > Is there a way to provide a print option so that users can print the
>> > pages without the ads?
>>
>> Since your agreement with your hosting provider almost certainly
>> forbids removing the adverts, it is very likely that your only
>> reasonable option is to switch to better hosting.
>
> I had thought, in my reply, it was ok to include a print style
> sheet but, of course (!), this is probably unlikely to work on
> such hosting.

Why do you say that? It seems very unlikely that such a server would be
clever enough to distinguish a print stylesheet from any other
stylesheet, especially since it's the browser, not the server, that
decides what rules to apply.


--
Berg

Re: Print without ads

am 30.05.2007 23:26:39 von 23s

"Mike S." wrote in message
news:1180502474.289805.174760@o5g2000hsb.googlegroups.com...
> My website is a free one that places ads on the top of the web page.
> Is there a way to provide a print option so that users can print the
> pages without the ads?
>

Yes.

Create a CSS stylesheet thus in the section (or put in a separate CSS
file if you so desire) thus:



Note 'media="print" attribute of the style tag. This is what allows you to
reformat your stuff for printing.

Give the ad (assuming it's an image) a classname like 'noprint' thus:

An ad.

You can extend this to remove lots of other stuff from your printout like
menus etc.... just wrap the stuff you don't want printed with a div of class
'noprint'.

Be warned... I haven't tried this on crusty browsers, but it works with
current releases of IE, FF and Opera.

Re: Print without ads

am 31.05.2007 00:39:36 von dorayme

In article <5c5at0F2uukttU1@mid.individual.net>,
Bergamot wrote:

> dorayme wrote:
> > In article
> > <1180508398.631947.214760@k79g2000hse.googlegroups.com>,
> > David Dorward wrote:
> >
> >> On May 30, 6:21 am, "Mike S." wrote:
> >> > My website is a free one that places ads on the top of the web page.
> >> > Is there a way to provide a print option so that users can print the
> >> > pages without the ads?
> >>
> >> Since your agreement with your hosting provider almost certainly
> >> forbids removing the adverts, it is very likely that your only
> >> reasonable option is to switch to better hosting.
> >
> > I had thought, in my reply, it was ok to include a print style
> > sheet but, of course (!), this is probably unlikely to work on
> > such hosting.
>
> Why do you say that? It seems very unlikely that such a server would be
> clever enough to distinguish a print stylesheet from any other
> stylesheet, especially since it's the browser, not the server, that
> decides what rules to apply.

I said it because DD brought further to my attention that it was
a free web hosting service, and while his point might have been a
legal one, I then went on to think they would likely make
technical provisions to stop any different stylesheet from
operating to avoid their ads. I have a couple of barely used free
service and they quite often override various things I have
tried, perhaps there are cleverer ways of doing things that
escaped me.

But you make me regret the craven appearance of my retraction. My
enemies, and there are many, can take advantage of this.

Anyway, I just had a thought, as crisp in its novelty as it is
chilly this fine morning in Sydney, the proof is in the pudding,
OP might consider trying it and seeing what happens when he/she
prints and then, if all goes well, seeing if any letter from any
solicitor comes in the post or worse, several large thugs on the
doorstep.

--
dorayme