droidus Posted August 17, 2011 Share Posted August 17, 2011 i have a percentage bar, and it is not centering in my div. here is my code: <div id="outerPercentContainer" style="width: 200px; background-color:#FFF; border: 2px #000000 solid; margin-left:auto; margin-right:auto;"> <div id="actualPercentage" style="width: <?php echo $usagePercent; ?>%; background-color:#09F; font-weight:bold;"> <div id="percentageText" style="text-align:center; width:200px;"> <?php echo $usagePercent."% of 250 MB"; ?></div> </div> </div> thanks in advance [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Frank P Posted August 17, 2011 Share Posted August 17, 2011 If I copy and paste your code in an otherwise empty web page , replacing the php tags with actual values and putting a standards mode-invoking doctype over it, it centers perfectly. Be it that your code only includes the blue and white part plus the black border. Not the brown part. 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.