Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
print css
I have a slight problem with the media print
css and I was wondering if anyone can help.
What I have is the following:
<link rel="stylesheet" href="<txp:css n="default" />" title="Standard" media="screen" type="text/css" />
<link rel="stylesheet" href="<txp:css n="print" />" title="print" media="print" type="text/css" />
which does not seem to work as what it prints is not what is expected.
when however I add the content of the ‘print’ stylesheet in the default css all prints fine.
This is the second method:
default css
@media print{
my print css here
}
Any ideas?
Last edited by colak (2007-11-18 09:36:02)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: print css
Use the same Title attribute for both styles.
Offline
Re: print css
That simple huh? Ruud many thanks. All works as intended now.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2007-11-18 18:42:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: print css
Related question:
Can anyone tell me why
<link rel="stylesheet" type="text/css" media="print" href="<txp:css n="print" />" />
does work, but
<link rel="stylesheet" type="text/css" media="screen" href="<txp:css n="ie6_fix" />" />
doesn’t? It works when I create a section ‘ie6_fix’, assign style ‘ie6_fix’ to it, and use:
<link rel="stylesheet" type="text/css" media="screen" href="<txp:site_url />textpattern/css.php?s=ie6_fix" />
Last edited by els (2007-11-18 18:44:03)
Offline
Re: print css
Hi Colak & Els.
I can’t understand your problems. I always use this lines (with two separated stylesheets) :
<!-- styles --> <txp:css format="link" n="default" media="screen, projection" /> <txp:css format="link" n="print" media="print" /> <!-- /styles -->
and all the styles for printing version render fine as wanted. Look at this website (link deleted) I currently working on (not finished). It seems that all work fine. Strange!
Last edited by Pat64 (2007-11-19 08:02:17)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#6 2007-11-18 19:57:38
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: print css
Thanks Patrick. Your tag works, and the one I said that didn’t also appears to work. I don’t know why it did not when I posted, because the html output is the same. So it was probably something else that I did (and of course can’t remember) that caused it…
Offline
Re: print css
Patrick, mine did not work because, as ruut pointed out, the “Title” attribute was different for each stylesheet. Your code does not use “Title” so I guess that my problem was just that:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: print css
Ok Colak. I’ll trying to remember this tips.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1