GD Aligning?

This is a discussion on "GD Aligning?" within the PHP Forum section. This forum, and the thread "GD Aligning? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 1st, 2007, 20:59
Reputable Member
Join Date: Sep 2006
Location: England
Age: 20
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
GD Aligning?

When aligning text on an image i have no idea sometimes how long the text will be, so sometimes it doesn't align nicely. Check the preview for example.




I'd like it to end where 'Underground' does no matter how many characters are displaying thanks.
Reply With Quote

  #2 (permalink)  
Old Aug 2nd, 2007, 16:08
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: GD Aligning?

echo="<div align="right">$variable</div>"
you mean like that
not sure what your doing
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #3 (permalink)  
Old Aug 2nd, 2007, 16:13
Reputable Member
Join Date: Sep 2006
Location: England
Age: 20
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Re: GD Aligning?

It's GD... not CSS.

Quote:
You can use GD's imagettfbbox function to calculate the 'bounding box' of the text (in this case "Pro") then do a few quick calculations for the x and y co-ordinates to be fed into imagettftext (or whatever you're using to render the text).
From another forum.
Reply With Quote
  #4 (permalink)  
Old Aug 2nd, 2007, 16:14
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: GD Aligning?

Sorry should of read.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
Reply

Tags
aligning

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aligning box to right fr33sty13 Web Page Design 8 Jun 6th, 2008 03:49
Aligning content fr33sty13 Web Page Design 5 Apr 26th, 2008 14:01
Aligning scrollbars Ola JavaScript Forum 4 Feb 29th, 2008 16:16
CSS Aligning Wesley Web Page Design 15 Jan 20th, 2008 19:49
[SOLVED] Aligning to the very top thewebkid Web Page Design 4 Dec 23rd, 2007 08:48


All times are GMT. The time now is 05:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43