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

  • Home
  • SEARCH
  • 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 6380851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:19:16+00:00 2026-05-25T02:19:16+00:00

Related: How to get a background image to print using css? I’m aware that

  • 0

Related:
How to get a background image to print using css?

I’m aware that browsers don’t render CSS backgrounds when printing.

I’m making a simple bar graph using divs i.e.

<div style="width: 10px; height: 43%; background-color: blue;" title="Series A - 43%">A</div>
<div style="width: 10px; height: 55%; background-color: green;" title="Series B - 55%">B</div>

Is there any way to ‘color in’ the graph such that it prints correctly?

  • 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-05-25T02:19:17+00:00Added an answer on May 25, 2026 at 2:19 am

    I think you’re on to something using the border. You should be able to continue using a percentage width / height. Try using some negative margins to position the bar label.

    <hmtl>
    <head>
    <style type="text/css"> 
        .graph { border:solid 1px #aaa; background-color:#eee; height:200px; width:260px; }
        .graph h1 { color:#000; font-size:1.4em; }
        .graph p { color:#fff; }
        .graph div {  margin-top:8px; } 
        .graph div div { margin-top:-10px; }    
    
    </style>
    </head>
    <body>
    
        <div class="graph">
            <h1>Graph 1.1</h1>
            <p>Graph description</p>
    
            <div style="height:0px; width:43%; border-top:solid 7px blue; border-bottom:solid 7px blue;"  title="Series A - 43%"><div>A</div></div>
            <div style="height:0px; width:55%; border-top:solid 7px lime; border-bottom:solid 7px lime;" title="Series B - 55%"><div>B</div></div>
            <div style="height:0px; width:10%; border-top:solid 7px pink; border-bottom:solid 7px pink;" title="Series c - 10%"><div>C</div></div>
            <div style="height:0px; width:90%; border-top:solid 7px orange; border-bottom:solid 7px orange;" title="Series D - 90%"><div>D</div></div>
        </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have a partially transparent background/image (png logo with shadow) positioned
Been a while since I had a CSS related problem but here I am.
I found that as predicted when I was writing an image to file that
This is a NEW question and it is highly related to this topic: How
I am having a strange issue with apache and ssh, that I can correlate
I ran into a bizarre issue here. I'm developping an iOS app (for iPad,
[www.tdeltd.net][1] [1]: http://tdeltd.net is my site. The navigation bar is broken in all versions
I have a few jquery thinngs added to my site like gallery, callendar, autocomplete
I've self-taught myself all of my web design skills and now I'm having a

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.