Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9044561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:01:08+00:00 2026-06-16T11:01:08+00:00

I am trying print out details from my page, using a separate CSS file.

  • 0

I am trying print out details from my page, using a separate CSS file. The problem I am having is displaying everything that I want to display. My web page has an accordion on it for different details and I want it to display all the relevant details from the 3 accordion boxes but it is only printing data from the currently open box. I want the data from the ‘appointment-data’ class in all sections to be visible when printing.

<div id="accordion">

    <div>
         <h3><a href="#">Section 1</a></h3>
        <div>
            <div class="appointment-image">
                <img alt="img1" src="../../Content/images/img1.jpg" />
            </div>

            <div class="appointment-data">
                <div class="display-box">
                    <div class="display-label">@Html.LabelFor(model => model.Item1)</div>
                    <div class="display-field">@Html.DisplayFor(model => model.Item1)</div>
                </div>
                <div class="display-box">
                    <div class="display-label">@Html.LabelFor(model => model.Item2)</div>
                    <div class="display-field">@Html.DisplayFor(model => model.Item2)</div>
                </div>

            </div>
        </div>
    </div>
         <h3><a href="#">Section 2</a></h3>
        <div>
            <div class="appointment-image">
                <img alt="" src="../../Content/images/img2.jpg" />
            </div>

            <div class="appointment-data">
                <div class="display-box">
                    <div class="display-label">@Html.LabelFor(model => model.Item3)</div>
                    <div class="display-field">@Html.DisplayFor(model => model.Item3)</div>
                </div>                                    
            </div>
        </div>
    </div>
    <div>
         <h3><a href="#">Section 3</a></h3>
        <div class="appointment-image">
            <img alt="" src="../../Content/images/img3.jpg" />
        </div>

        <div class="appointment-data">
            <div class="display-box">
                <div class="display-label">@Html.LabelFor(model => model.Item4)</div>
                <div class="display-field">@Html.DisplayFor(model => model.Item4)</div>
            </div>                                    
        </div>
    </div>

</div>

As it’s an accordion, only one section is visible at a time and I would rather use CSS and HTML than jQuery/JavaScript. The accordion is done using jQuery.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:01:09+00:00Added an answer on June 16, 2026 at 11:01 am

    I was having the same problem and I found the solution, give “id” for your each div, let’s assume “divAccordion1, divAccordion2, divAccordion3” respectively. The following works for my case, it’ll open up all three accordions and print the content.

    <style type="text/css">
    @media print{
    #divAccordion1 {display: block !important;}
    #divAccordion2 {display: block !important;}
    #divAccordion3 {display: block !important;}
    }
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to print out a list of products on a page. This is
I am having trouble with my Objective-C code. I am trying to print out
I'm using Django templating with Google App Engine. I'm trying unsuccessfully to print out
I'm trying to come up with an algorithm that will print out all possible
I'm trying to read a few RSS feed details from a XML file with
I am trying to print out true if there is such letter/word and false
I am trying to print out documents in various different orders. Right now I
I am trying to print out the names of each person in the loop.
I'm basically trying to iterate through a dict and print out the key /
I'm trying to write a very simple program, I want to print out the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.