How to add label to percentage bar in css and html?

A.Nabil

I did a percentage bar with css But I want write label with the number in percentage in it or beside it when I write it change

CSS code:

#progressbar {
    background-color: #999;
    border-radius: 10px; /* (height of inner div) / 2 + padding */
    padding: 0.5px;
    max-width:150px;
    font-size: 9px;
}
#progressbar > div {
    background-color:red;
    /* Adjust with JavaScript */
    height: 10px;
    border-radius: 10px;
    max-width:150px;
    font-size: 12px;    
}

and in body

echo" Excellent       <div id="."progressbar".">
  <div style="."width:".(($ex*150)/100)."px;".">".$ex."%</div>
</div>";

How can I want write a word beside it?

www139

Let me know if I can improve it :)

#progressbar {
  background-color: #999;
  border-radius: 10px;
  /* (height of inner div) / 2 + padding */
  padding: 0.5px;
  max-width: 150px;
  font-size: 9px;
  position: relative;
}
#progressbar > div {
  background-color: red;
  /* Adjust with JavaScript */
  height: 10px;
  border-radius: 10px;
  max-width: 150px;
  font-size: 12px;
}
#progressbar span {
  position: absolute;
  width: 100%;
  text-align: center;
}
<div id="progressbar">
  <span>Excellent</span>
  <div style="width:100px;"></div>
</div>

UPDATE: (request for text alongside the progress bar)

#progressbar {
  background-color: #999;
  border-radius: 10px;
  /* (height of inner div) / 2 + padding */
  padding: 0.5px;
  max-width: 150px;
  font-size: 9px;
  width: 100px;
  display: inline-block;
}
#progressbar > div {
  background-color: red;
  /* Adjust with JavaScript */
  height: 10px;
  border-radius: 10px;
  font-size: 12px;
}
#progressBarContainer span {
  display: inline-block;
}
<div id="progressBarContainer">
  <div id="progressbar">
    <div style="width:50%;"></div>
  </div>
  <span>Excellent</span>
</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How I can add progress bar with label with percentage of progress of upload in Alamofire 4.0

From Dev

How to add percentage or count labels above percentage bar plot?

From Dev

How to add a label inside the Input field using pure HTML and CSS

From Dev

How do I add an image to a progress bar in HTML/CSS?

From Dev

How to add a label to Seaborn Heatmap color bar?

From Dev

How to add Label on Bar Button Item?

From Dev

How to add label for each bar in barplot lan

From Dev

How put percentage width into html canvas (no css)

From Dev

Adding a percentage label to progress bar jquery

From Dev

CSS percentage of transition (for progress bar)

From Dev

How to add focus on label css style

From Dev

How to add focus on label css style

From Dev

Plotly (python) : How to add more then one text label in a bar chart

From Dev

How to add label square to Bar Chart using Chart.js

From Dev

How to fix position of html element label with css?

From Dev

How to add percentage-of-height top/bottom margin in CSS

From Dev

Is my code HTML and CSS proper, and how do I add a hover effect to just the text in the nav bar?

From Dev

How to add an image in the title bar using html?

From Java

Can't understand how percentage work in html/CSS

From Dev

how to position a search bar in html/css

From Dev

HTML CSS, how to create a Side bar or column

From Dev

add html in wordpress label

From Dev

How to add CSS for HTML to NSAttributedString?

From Dev

How to add external css into html

From Dev

css html percentage resize image

From Dev

JFreeChart | How to add percentage to top of each bar and format domain axis (X axis) ticklabels?

From Dev

How can I add the current GPU usage to my menu bar as a percentage?

From Dev

Targeting HTML Label for CSS

From Dev

How to display percentage values of label JFreeChart?

Related Related

  1. 1

    How I can add progress bar with label with percentage of progress of upload in Alamofire 4.0

  2. 2

    How to add percentage or count labels above percentage bar plot?

  3. 3

    How to add a label inside the Input field using pure HTML and CSS

  4. 4

    How do I add an image to a progress bar in HTML/CSS?

  5. 5

    How to add a label to Seaborn Heatmap color bar?

  6. 6

    How to add Label on Bar Button Item?

  7. 7

    How to add label for each bar in barplot lan

  8. 8

    How put percentage width into html canvas (no css)

  9. 9

    Adding a percentage label to progress bar jquery

  10. 10

    CSS percentage of transition (for progress bar)

  11. 11

    How to add focus on label css style

  12. 12

    How to add focus on label css style

  13. 13

    Plotly (python) : How to add more then one text label in a bar chart

  14. 14

    How to add label square to Bar Chart using Chart.js

  15. 15

    How to fix position of html element label with css?

  16. 16

    How to add percentage-of-height top/bottom margin in CSS

  17. 17

    Is my code HTML and CSS proper, and how do I add a hover effect to just the text in the nav bar?

  18. 18

    How to add an image in the title bar using html?

  19. 19

    Can't understand how percentage work in html/CSS

  20. 20

    how to position a search bar in html/css

  21. 21

    HTML CSS, how to create a Side bar or column

  22. 22

    add html in wordpress label

  23. 23

    How to add CSS for HTML to NSAttributedString?

  24. 24

    How to add external css into html

  25. 25

    css html percentage resize image

  26. 26

    JFreeChart | How to add percentage to top of each bar and format domain axis (X axis) ticklabels?

  27. 27

    How can I add the current GPU usage to my menu bar as a percentage?

  28. 28

    Targeting HTML Label for CSS

  29. 29

    How to display percentage values of label JFreeChart?

HotTag

Archive