PDA

View Full Version : Complex Print CSS problem.



lewisyoung
August 15th, 2006, 08:36 AM
hi

i took a look at the other thread regarding Print CSS, and think that my problem is a little more intense :(

to cut a long story short i am working on the CSS for a large company who has reports of 'best buy' items. now, prior to launch we wanted to pull the printCSS as it was breaking some pages - but instead we included it, but cut down.

now, when you print the pages in Ffox - it looks absolutely fine, and prints out fantastically. however, when you print it in IE:m: it goes completely **** up! no styling at all - random image placement - random pages printing. nightmare.

all i can think is that the html is going through Rhythmyx CMS system, which is rendering the html in such a way that the browser is spazzing out!! :fight:

here is what the CMS is spitting out in the header of the page(s) in question:
href="/static/css/print.css" media="print" rel="stylesheet"/>
<style type="text/css">
@import url(/static/css/master.css);
@import url(/static/theme/orange/css/theme.css);

@import url(/static/css/green.css);
@import url(/static/css/ppstyles.css);
@import url(/static/css/tour.css);
@import url(/static/css/SMstyles.css);
</style>

any ideas?

Jeff Wheeler
August 15th, 2006, 09:26 AM
Is the css from the @imported styles being applied to the print version in IE? FF? Is this the behavior you want, or do you want only the linked stylesheet to be applied?

What's the html the cms is outputting?

mr.hood
August 15th, 2006, 10:43 AM
This might help High Res Printing (http://www.alistapart.com/articles/hiresprinting/) (A List Apart.) Worth a look maybe...

ditt0
August 15th, 2006, 11:46 AM
When you set "<style type="text/css">" for the imported styles, you still need to specify the media you assign them to (as in media="screen"), otherwise they might override the print style.

lewisyoung
August 24th, 2006, 06:33 AM
When you set "<style type="text/css">" for the imported styles, you still need to specify the media you assign them to (as in media="screen"), otherwise they might override the print style.

so with this in mind, how would it be best to lay out the CSS ref's in the html in the header component?
do you, or anybody know of any complications with linking style sheets in these different ways? i.e. one method is importing the style sheet (@import url()) the other is the relative linking.
im not sure why the cms system is outputting this info in this way, but i shall investigate.... :smirk2: