63 replies [Last post]
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 20 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

CSS Print Stylesheet: Set Background images to print?

It's a good point Briski, they can create the illusion that all is well to people who do not understand the issues surrounding accessibility and that it's not an exacting art and most certainly can't be confirmed at the click of a button.

Actually it's a dam good reason to frown on the things, they ought to have a huge disclaimer at the top of the site warning that "this in no way means you have an accessible site, could you please back of and leave the rest of the work to the developer who knows what he's doing"

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Lorraine
Lorraine's picture
Offline
Elder
UK
Last seen: 16 years 40 weeks ago
UK
Timezone: GMT+1
Joined: 2005-01-04
Posts: 1001
Points: 0

CSS Print Stylesheet: Set Background images to print?

Hugo wrote:
leave the rest of the work to the developer who knows what he's doing

That's a big assumption. Most developers of "accessible" sites that I've dealt with did not know what they were doing, had been told about auto-checkers by "someone on a forum" who did not tell them about the drawbacks of relying on automated checking.

I'll just get back to reading my MacOSX manual O:)

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 20 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

CSS Print Stylesheet: Set Background images to print?

I'm into big assumptions, but you know what I mean, not a literal statement but a generalization.

Please stop crowing about your lovely nice new Mac, it's alright for some with healthy credit card limits :roll: I so need a good laptop with wireless connection so that I can decamp to the pub and work, it's not fair Sad

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Lorraine
Lorraine's picture
Offline
Elder
UK
Last seen: 16 years 40 weeks ago
UK
Timezone: GMT+1
Joined: 2005-01-04
Posts: 1001
Points: 0

CSS Print Stylesheet: Set Background images to print?

Not crowing - oh no. I had it in my hands for precisely 10 minutes before it went back - twice - still at the mechanics. The trouble is... the fan keeps blowing out the candles that light up the screen. :-$

purefusion
Offline
Regular
Last seen: 17 years 44 weeks ago
Joined: 2005-07-22
Posts: 40
Points: 0

CSS Print Stylesheet: Set Background images to print?

I did poke around in the system settings and found how to activate the diolog box accessibility... the option was unchecked.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 20 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

CSS Print Stylesheet: Set Background images to print?

Lorraine wrote:
. The trouble is... the fan keeps blowing out the candles that light up the screen. :-$
Laughing out loud
Macs so behind the times they really should be using gauze lamps by now :roll:

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Lorraine
Lorraine's picture
Offline
Elder
UK
Last seen: 16 years 40 weeks ago
UK
Timezone: GMT+1
Joined: 2005-01-04
Posts: 1001
Points: 0

CSS Print Stylesheet: Set Background images to print?

Oh, I kno o o w! Now, this is the question."Should we wait for rtb, or scarper while we both still have our foibles?"

SuperRoach
SuperRoach's picture
Offline
Enthusiast
Ballarat
Last seen: 11 years 38 weeks ago
Ballarat
Timezone: GMT+10
Joined: 2007-02-26
Posts: 291
Points: 6

man this went offtopic. As

man this went offtopic.

As a side note, if someone does want to print the background image of a css, would it be feasible to use absolute positioning, of a div thats only visible when the print stylesheet is active?

This would mean some duplicate items in your html, possibly

I tried something similar with great success in firefox and safari, but it fell apart for ie, so back to the drawing board with how I done it.

Triumph (not verified)
Anonymous's picture
Guru

SuperRoach wrote:man this

SuperRoach wrote:
man this went offtopic.

Yeah, two years ago. Tongue

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 8 years 32 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

SuperRoach wrote:would it be

SuperRoach wrote:
would it be feasible to use absolute positioning, of a div thats only visible when the print stylesheet is active?

Doesn't need to be absolutely positioned; use an image in the HTML and then just set it to display: none in your screen stylesheet. I do this sometimes if I've used image replacement on a logo or title graphic for a site.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

SuperRoach
SuperRoach's picture
Offline
Enthusiast
Ballarat
Last seen: 11 years 38 weeks ago
Ballarat
Timezone: GMT+10
Joined: 2007-02-26
Posts: 291
Points: 6

Triumph wrote:Yeah, two

Triumph wrote:
Yeah, two years ago. Tongue

Rofl, you are so correct - I looked at only the month and date and assumed it was recent.. lol. Guess the table wars were much more heated then.

Tyssen wrote:

Doesn't need to be absolutely positioned; use an image in the HTML and then just set it to display: none in your screen stylesheet. I do this sometimes if I've used image replacement on a logo or title graphic for a site.

Don't forget the display will have to be overwritten with the print stylesheet then...
I have a .noprint (display:none in the print stylesheet) , and a .onlyprint (display:none in screen, then block or whatnot in print sheet) when I try to have a clean printable page. Remember css backgrounds won't print, so plan for that in your code.

using em fontsizes are a bit of a mixed sword too, they size much better for print than px (which probably should be phased out anyway)... better /rant

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 8 years 32 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

SuperRoach wrote:Don't

SuperRoach wrote:
Don't forget the display will have to be overwritten with the print stylesheet then.

Not necessarily. It depends what you're doing with it.

SuperRoach wrote:
I have a .noprint (display:none in the print stylesheet)

You don't need to apply extra markup to your HTML just to be able to turn them off in your print stylesheet. Simply list all the elements you don't want to print; no need for a .noprint class.

SuperRoach wrote:
Remember css backgrounds won't print, so plan for that in your code.

Um, isn't what this whole discussion is about?

SuperRoach wrote:
using em fontsizes are a bit of a mixed sword too, they size much better for print than px

Don't use ems for your print stylesheet; use pixels or points.

I get the impression from the way you're talking that your print stylesheets are more complicated than they need to be. I take the approach that you shouldn't be trying to replicate what appears on screen; just give them use the information on the page. To that end, my print stylesheets generallly look like this:

body { font-family: Verdana, sans-serif; font-size: 10pt; color: black; width: 600px; }

#skip, #breadcrumb, #page-nav, #site-search,
#contact, #global-links,
.offset, br, form { display: none; } /* these are all the elements you don't want to display */

h1, h2, h3, h4, h5 {
margin: 15px 0 5px;
font-family: "Trebuchet MS", Verdana, sans-serif;
}

h1 { font-size: 200% }

a:link, a:visited { color: #999; text-decoration: none; }

#print-logo { float: left; margin-right: 15px } /* this is set to display: none in the screen stylesheet */

#footer { clear: both; margin: 20px; font-size: 80%; }

And that's it, that's pretty much all you need.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 1 year 4 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

I wondered why I saw

I wondered why I saw Lorraine and DCElliott's avatars in a thread Tongue

Verschwindende wrote:
  • CSS doesn't make pies