OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] WebHelp and print

On Wed, Mar 21, 2012 at 3:13 AM, Bort, Paul <pbort@tmwsystems.com> wrote:



I'm quite happy with the WebHelp option in 1.76.1, but I'd like to be able to print from it without having to turn off the TOC/Search each time. I've got this chunk of CSS that gets close:


@media print {

    body * {



    #content, #content * {

        visibility: visible;


   #content {


        left: 0;

        top: 0;




(Based on http://stackoverflow.com/a/2618980.) But it still leaves blank space for the TOC along the left side. I tried "margin-left: 0px;" to counter the style set on the "content" div, but it didn't work, probably due to my lack of CSS knowledge.

You may just call showHideToc() _javascript_ function to hide the TOC. It's available in main.js file. If you still want to do this via CSS, understand how it hides the TOC, and  implement the same via CSS.

I tested it a little, and setting following CSS styles hides the TOC/Search. Mind that this is without your CSS styles. #sidebar stands for leftnavigation.
If you look closely, webhelp mainly has three div s inside <body>, ie #header, #content, and #sidebar. So, as you can see it's easier to deal with these separately rather than working appending CSS to body.

#content {
    margin: 0 0 0 0;
#sidebar {
    display: none;

Does this work for you? I tested this in latest snapshot, but showHideToc haven't changed logic-wise after the 1.76.1 release.


Any suggestions?



Paul Bort

Systems Engineer

TMW Systems, Inc.



Kasun Gajasinghe
Software Engineer; WSO2 Inc.; http://wso2.com,
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://blog.kasunbg.org


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]