• Resolved wremmert

    (@wremmert)


    Need a little help on the CSS. As you can see below, I’ve tried to make everything visible when printing. However, under the hood of a closed accordion, it says style=”display: none;” and since it’s an inline setting, it wins.
    I need to print all items as if hey were opened.

    Thanks
    Bill

    @media print
    {
    .accordion-content {
    visibility: visible !important;
    display: block !important;
    aria-hidden: false !important;
    }

    .accordion-content read {
    visibility: visible !important;
    display: block !important;
    aria-hidden: false !important;
    }

    .accordion-content open {
    visibility: visible !important;
    display: block !important;
    aria-hidden: false !important;
    }
    .accordion-title read {
    visibility: visible !important;
    display: block !important;
    color: black !important;
    }

    .accordion-title open {
    visibility: visible !important;
    display: block !important;
    color: black !important; }

    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    Hmm. I’m not sure why this wouldn’t be working. !important should override any inline styles. All you should need is this (works for me):

    @media print {
      .accordion-content {
        display: block !important;
      }
    }

    Is it possible to get a link to the site so I can take a look?

    Thread Starter wremmert

    (@wremmert)

    Hi Phil,

    I seemed to have fixed it. I think what was happening was that there was another print stylesheet being loaded that I wasn’t aware of and it took over. Since I had placed the above style block in my main style.css, it never got into play.

    On another note, I implemented the open Everything JavaScript and then reversed the logic to create a Close everything button. I then created a shortcode that includes both buttons, making it easier for my accordion users to add the buttons.

    Cheers,
    Bill

    • This reply was modified 7 years, 5 months ago by wremmert.
    Plugin Author philbuchanan

    (@philbuchanan)

    Glad you got everything working, including the open and close buttons.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Print Still Hiding Content’ is closed to new replies.