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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:33:34+00:00 2026-06-01T19:33:34+00:00

I have a site that I’m trying to make a printable version and I’m

  • 0

I have a site that I’m trying to make a printable version and I’m using a new print stylesheet, but I’m having a problem. I have a DIV for star ratings that is just an empty DIV in the html file, but in the regular CSS I have background images for the actual stars.

The DIV in the html file looks like this:

<div class="example_rating"></div>

The code in the regular stylesheet looks like this:

.example_rating {

  height:40px;

  width:200px;

  margin-left:20%;

  background: url('../stars.png') no-repeat scroll 0 0 transparent;

  }

My problem is that the star ratings aren’t showing up at all in the printable format of the web page. I don’t have the DIV hidden or anything, but I’m not sure what I can do to get it to show up in the printable format.

I realize the question may be a little vague, but I’m not sure how else to explain it. I can definitely give more details if need though. Thanks!

  • 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-01T19:33:35+00:00Added an answer on June 1, 2026 at 7:33 pm

    In your CSS, the stars are rendered as a background image, and when printing, backgrounds aren’t usually displayed by default.

    You’ll either have to display the stars as an <img>, or tell your users to enable printing of backgrounds.

    EDIT:

    The easiest way to get round this would be to print the star rating as text as well as the background image, and then have the font inside the div transparent (and yellow in the print stylesheet). Example:

    <div class="example_rating">
      4/5 stars.
    </div>
    

    Stylesheet:

    .example_rating {
      color:Transparent;
      /* Alternatively: text-indent: -9999px; */
      height:40px;
      width:200px;
      margin-left:20%;
      background: url('../stars.png') no-repeat scroll 0 0 transparent;
    }
    

    EDIT 2:

    You could try putting this in your print stylesheet:

    .example_rating {
      background: none;
    }
    .example_rating:after {
      content: '4/5 stars'
    }
    

    This puts some text inside the div using CSS, and if you put it in your print stylesheet only, it will only appear when you print!

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

Sidebar

Related Questions

I have a site that is using x509 client certificates (2 way SSL) to
I have a site that I am currently working on in ASP.NET 2.0 using
I have a really simple site that I created. I am trying to test
I have a site that host more then 60 services. With the simplified version
I have a French site that I want to parse, but am running into
I have site that I want to look like this: but instead it looks
I have a site that displays user input by decoding it to unicode using
I have a site that uses the FCKEditor. I'd like to make an incredibly
I have site that works fine but when i put it through Google translate
I have a site that allows users to vote on images. Each image has

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.