Z?v?? Posted May 3, 2007 Share Posted May 3, 2007 I've got bars on my criminal records page that are going over 100% and are getting really long causing the page to goof up. Heres what my criminal records page looks like... My problems fixed....You dont need to see this code anymore :-P Anyone have a solution??? Quote Link to comment Share on other sites More sharing options...
Almost Posted May 4, 2007 Share Posted May 4, 2007 Re: Bars over 100% ???? change the max with of the bar? Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted May 4, 2007 Author Share Posted May 4, 2007 Re: Bars over 100% ???? Well I think part of the problem is that the percents arent accurate. I have 22 passed crimes and 3 failed crimes and the bar says 733% So I know thats not correct. Anyone know how to fix the accuracies? Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 4, 2007 Share Posted May 4, 2007 Re: Bars over 100% ???? 22 / (22 + 3) * 100 = uh 88% if i remember right Guess its a maths problem Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted May 4, 2007 Author Share Posted May 4, 2007 Re: Bars over 100% ???? Ya...So mines way off. How would you fix this Decepti0n? Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 4, 2007 Share Posted May 4, 2007 Re: Bars over 100% ???? $cdone = $rr[crimesdone]; $cfailed = $rr[crimesfailed]; $ciperc= ($cdone / ($cdone + $cfailed) * 100); // $ciperc = 15 etc Try that, dunno what the one after it is for Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted May 4, 2007 Author Share Posted May 4, 2007 Re: Bars over 100% ???? Ok, that worked. Except now the percent is showing up like this... 84.615384615385% :? Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 4, 2007 Share Posted May 4, 2007 Re: Bars over 100% ???? $ciperc = round($cdone / ($cdone + $cfailed) * 100); Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted May 4, 2007 Author Share Posted May 4, 2007 Re: Bars over 100% ???? Gahh...you're a genious. Thank you. +1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.