|
Posted by Rik on February 19, 2007, 4:34 am
Please log in for more thread options
> Rik wrote:
>>> I'd like to print a page but would exclude all elements but one (a
>>> table). I've successfully removed all elements from printing with a
>>> print.css
>>> @page { size: portrait; margin: 2.5cm 1cm 1.5cm 1.5cm; }
>>> * {
>>> display: none;
>>> }
>>>
>>> yet that doesn't produce the desired result. How do I include the
>>> single table I'd like to print? Or do I have to remove any none print
>>> element by itself? How should I do this?
>>
>> Depends on the page layout. * will select 'body', so this wil have no
>> display, whatever you set subelements to. I usually can turn elements
>> on & off by their id, so a default print.css for me usually looks
>> something like:
>> #header,#footer,#navigation
>> #content
>
> Yes, but you have to give all your headers on each page the id "header"
> or use separate print.css for different pages. I'd like a more general
> solution if possible.
Well, same layout, same id's. Other layout, other id's, and ofcourse
another stylesheet. You can fiddle about with javascript, wouldn't
recommend it though.
--
Rik Wasmus
|