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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:27:11+00:00 2026-06-12T08:27:11+00:00

I made this simple html snippet: <div class=progress-bar></div> , then I styled it: .progress-bar

  • 0

I made this simple html snippet: <div class="progress-bar"></div>, then I styled it:

.progress-bar {
    background-color: #DFDFDF;
    height: 24px;
    margin-bottom: 6.66667px;
    margin-left: -2px;
    margin-top: -22px;
    z-index: 1;
}

Additionally:

<li>
<span class="name">
<a>theme</a>
</span>
<span class="value"> <?=$howtsrg?></span>
<div class="progress-bar"></div>
</li>

<?=$howtsrg?> = the value feteched from the database

Now, I want to give this progressbar a width, but this has to be automatically, depending on the value that is been fetched from the database. For example, I now have a list with a value 7 and a value 2… I want to have a different width of the progressbar, because they do not have the same value. How can I make this work? I couldn’t find a relevant jQuery script.

PS: the list values are dynamic and will change as days go past! So 7 and 2 can be 15 and 22!

  • 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-12T08:27:13+00:00Added an answer on June 12, 2026 at 8:27 am

    Just do this way. Say, you have got a value like 72. You can use jQuery to do this way:

    $(".progress-bar").css("width", "75%");
    

    Or, you can do this way:

    $(".progress-bar").width("75%");
    

    You need to give px: Change width: <?=$howtsrg?>px;

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

Sidebar

Related Questions

I have made a simple fragment of html, which contains this: <a href=#><div>Something here</div></a>
This is a simple HTML question, made more embarrassing (and harder to google) since
I've made this example as simple as possible: <!DOCTYPE html> <html> <head> <title>Test</title> <link
Given this simple html, <select id=ddl> <option style=background:#0f0>a</option> <option style=background:#f00;>b</option> <option>c</option> </select> ( http://jsfiddle.net/DxK47/
I've made some pretty checkboxes using some pretty simple jQuery HTML <span class=iconElement checkBox
I made this simple function to filter the data. I add the symbols that
I recently made this simple navigation where you have a couple links that have
I'm working on a bigger project atm, but I made this simple example to
So I made this (very simple) program with a swing GUI with NetBeans, and
This is simple text detection video made using an opencv. Any ideas how was

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.