TONYTOC Posted July 17, 2010 Share Posted July 17, 2010 Hopefully you guys can help me with this one. I have a stats module running on my site which has progress bars generated on the ranks and some awards given in the game. The code below works great on FF and chrome but IE is not handling the html correctly. The bars are way to fat on ie. function generateProgress($max,$score){ // Last Rank reached? if ($max == '0') $max = $score; if ($score > $max) $score = $max; // Generate the width $width = number_format(floor(($score/$max)*100), 0); $width = ($width < 1) ? 0 : $width; // Generate the bar return '<div class="progressbar"><div class="bar" style="width: '.$width.'%"></div></div>'; } site: http://www.toctheothercrew.com/modules.php?name=BC2_Stat_Tracker The author of the code is a pretty busy young man so id like to solve this one with some outside help. Quote Link to comment https://forums.phpfreaks.com/topic/208045-a-progress-bar-looks-goos-in-ff-but-not-ie/ Share on other sites More sharing options...
mrdamien Posted July 17, 2010 Share Posted July 17, 2010 Not a PHP problem. Try changing your css: From this: <style type="text/css"> .progressbar { border: #333333 1px solid; height: 2px; margin: 0 2px; padding: 1px; width: 72px; } .bar { background-color: #ff7700; height: 2px; float: left; } </style> to this: <style type="text/css"> .progressbar { border: #333333 1px solid; height: 2px; margin: 0 2px; font-size: 0px; padding: 1px; width: 72px; } .bar { background-color: #ff7700; height: 2px; line-height: 2px; font-size: 0px; float: left; } </style> Quote Link to comment https://forums.phpfreaks.com/topic/208045-a-progress-bar-looks-goos-in-ff-but-not-ie/#findComment-1087616 Share on other sites More sharing options...
TONYTOC Posted July 18, 2010 Author Share Posted July 18, 2010 Not a PHP problem. Sorry, and thank you very much that did the trick. Quote Link to comment https://forums.phpfreaks.com/topic/208045-a-progress-bar-looks-goos-in-ff-but-not-ie/#findComment-1087625 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.