Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 10:23 PM
SK
Guest
 
Posts: n/a
Default percentage indicator

How to achieve this*? Percentage number is always in
the middle of the table. If needed, the number is overlayed
over the cell border (for example, in case of "55%").
Thanks,

-----------------------------------
| | |
| | 35% |
| | |
-----------------------------------


-----------------------------------
| | |
| 75% | |
| | |
-----------------------------------


* For viewing, non-proportional font required.




  #2  
Old July 20th, 2005, 10:23 PM
Thomas Mlynarczyk
Guest
 
Posts: n/a
Default Re: percentage indicator

Also sprach SK:
[color=blue]
> How to achieve this*? Percentage number is always in
> the middle of the table. If needed, the number is overlayed
> over the cell border (for example, in case of "55%").[/color]

Quick, dirty and tested only on IE5:

<div id="progress">
<div id="done"></div>
<div id="percent">55%</div>
</div>

#progress {
position:relative;
width:200px;
border:1px solid black;
}

#done {
width:55%;
background-color:green;
}

#percent {
position:absolute;
top:0;
left:90px;
color:red;
}

Drawback: the percentage is not exactly in the middle, but maybe you can
improve this code.

Greetings,
Thomas



  #3  
Old July 20th, 2005, 10:23 PM
SK
Guest
 
Posts: n/a
Default Re: percentage indicator

[snip]

Great, exactly what I need. Thanks.


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles