SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: My Poll Bar
-
Jul 10, 2001, 20:28 #1
- Join Date
- May 2001
- Location
- USA
- Posts
- 83
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My Poll Bar
I made a poll. I have everything working, except 1 thing. It's the size of the bar. I got the percent of each poll answer, but when I put width="% of result" it is real small. I need to use pixels. Does anyone know how to do this?
Thanks
-ChadChad Crouch
http://chadmc.com
-
Jul 10, 2001, 22:31 #2
- Join Date
- Mar 2001
- Location
- canada
- Posts
- 286
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
easy
what is the maximum length in pixels that the bar can be?
that will be 100%.
to find length in pixels for varrying percents all you need to do is take the percent value in decimal form (ie: 65% = 0.65) and multiply it by the maximum length of the bar.
example: say you wanted a 65% long bar and the maximum length of the bar is 112pixels.
0.65 * 112 = 72.8 which is approximatly 73 pixels (youll have to round up or down as you cant use decimal values for dimentions in html).
Bookmarks