almightyegg Posted November 19, 2006 Share Posted November 19, 2006 [code]<center><b>LF:</b> $mem[curlf] / $mem[maxlf]<br><div style=\"background-color:red;height:8px;width:120px;\"><div style=\"background-color:green;align:left;height:8px;width:".$percent."%;\"></div></div></center>[/code]right the php works fine (otherwise i would post this on php board) but instead of the green bit being on the left, it centers on the red...if that makes sense ??? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 19, 2006 Share Posted November 19, 2006 Its because you have the div in the center tags so both divs will be centered and thus the green div gets centered in the middle of the red div. What you'll want to do is add [b]float:left;[/b] to the green divs style attribute. Quote Link to comment Share on other sites More sharing options...
almightyegg Posted November 19, 2006 Author Share Posted November 19, 2006 thanks :) 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.