The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Progress Bars using css

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Amos King

Posts: 78
Nickname: adkron
Registered: Jan, 2007

Amos King is a Web Developer for the US Postal Service and for Ramped Media.
Progress Bars using css Posted: Jan 14, 2007 10:15 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Amos King.
Original Post: Progress Bars using css
Feed Title: DirtyInfomation.com
Feed URL: http://dirtyinformation.com/xml/rss
Feed Description: Things that I run into while programing, and my daily two hour one way comute to work. So, yes, a little bit of politics makes it in there.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Amos King
Latest Posts From DirtyInfomation.com

Advertisement

I spend a little time trying to get css to make a progress bar for me. It took some thought and time, but everything worked out well. I thought I would put it here for everyone to see.

The CSS


.prog-empty {
  width: 400px;
  height: 15px;
  background: #247;
  padding: 0;
  margin: 20px;
  border: 5px;
}

.prog-bar {
  height: 15px;
  background: #f70;
  padding: 0;
  margin: 0;
}

The html


<div class=".prog-empty">
  <div class="prog-bar" style="width: 63%">
  </div>
</div>

Now the width percentage needs to be replaced with a function. With the exact code from above I get something like:

I hope everyone can find this useful. Remember that you can use url("image.file") in place of the colors.

Read: Progress Bars using css

Topic: Happy New Year Previous Topic   Next Topic Topic: Building a DSL in Ruby (part 2)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use