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 9188227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:57:20+00:00 2026-06-17T19:57:20+00:00

I have a HTML report page that contains amongst other things a HTML view

  • 0

I have a HTML “report” page that contains amongst other things a HTML view that looks like this:

enter image description here

When you print preview this though, it looks a lot less nice 🙂

enter image description here

I know about CSS for printing, but what I don’t understand is how my HTML is being interpreted like that – for example why do my blue borders come up fine, but my colored boxes (which are actually just empty divs inside a td cell) don’t show up at all in the print preview. Also, why would the white text on black on the left not print like that?

Are there some rules for print-friendly css? Any suggestions here?

BTW – I tried previewing in both IE 10 and chrome – both pretty much did the same

  • 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-17T19:57:22+00:00Added an answer on June 17, 2026 at 7:57 pm

    I guess the problem is related to “background-color” and “background-image” properties that are ignored by default on many browsers (when printing).

    For chrome you can add the following code to your print css, in firefox and IE you must select “print background” in the print dialog.

    :root {
      -webkit-print-color-adjust: exact;
    }
    

    EDIT: AN ALTERNATIVE APPROACH

    Since you’re looking for a way to provide readable information also on the printer you may provide specific content just for that:

    in your HTML:

    <td class="green_background blue_border">
        <img src="img/green_bk.png" class="show_on_print">
    </td>
    
    <td class="orange_background blue_border with_star">
        <img src="img/orange_with_star_bk.png" class="show_on_print">
        <span class="hide_on_print">*</span>
    </td>
    

    in your stylesheet:

    @media screen,print 
    {
        .blue_border {border: 1px solid #00F;}
    }
    
    @media screen
    {
       .green_background {background-color: #0F0;}
       /* hide something when displayed on screen */
       .show_on_print {display: none;}
    }
    
    @media print
    {
        img.show_on_print {/* add size, etc. */}
        .hide_on_print {display: none;}
    }
    

    you have to create also the images. The idea is to replace the background with some small sprites, or an alternative text only on printers. This works in any browser

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have html that looks like this with several items <div class=item> <p class=price>$388.00</p>
I have this report that I generate in an aspx page. I would like
I have an HTML report, with each print page contained by a <div class=page>
I have a HTML page that contains a search box containing a number of
I have a web-page that starts like so: <!DOCTYPE html> <html> <head> <!--[if lt
I have HTML view using 2010 .NET, which I am generating in the report
I have HTML like this: <article> <header> <hgroup> <h1>Wk 25 </h1> <h2>(18-06 tot 24-06)</h2>
I have HTML like this: <div> <a href=>sometext<img src=images/001.jpg /></a> <a href=>sometext<img src=images/002.jpg /></a>
Similar to this question , but I have one master report which contains many
I have a report that renders a report header on its own page and

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.