HaLo2FrEeEk Posted February 28, 2007 Share Posted February 28, 2007 Hey, I got help with the code for a project I was doing yesterday, and I did it and it works perfectly: These are live stats from my forum, taken from my database. As you can see, it looks ok, as long as the values are pretty uniform, but when I get a board style that is only three characters long like this one: Then It starts to look weird, does anyone know how I can center the text and the avatar within a certain area? The max size for a username is 18 characters, the max length for theme is 11 characters, the shortest is 3, the post count, join date, and last visit date still need to be centered, but length doesn't really matter with those. Also, the max size for the avatars are 100x100, the minimum is anything less than that. I know I could get the width of the picture and do some math to figure out where to put it, right now, at full size, the x and y coordinates of the picture are: (45, 48), so that would be the maximum, but I can't figure out how I would calculate the location for things smaller than that. Link to comment https://forums.phpfreaks.com/topic/40433-centering-text-within-a-range-in-an-image/ Share on other sites More sharing options...
HaLo2FrEeEk Posted February 28, 2007 Author Share Posted February 28, 2007 You guys are purposely ignoring this, I don't believe for a second that no one knows how to do this, and I know that it is 100% possible, I am asking for some help, please, I got excellent help yesterday, I've tried to help as many people as I could, why are you guys ignoring me? Link to comment https://forums.phpfreaks.com/topic/40433-centering-text-within-a-range-in-an-image/#findComment-195701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.