Dimension of a GIF

I use a GIF to underline a title...

How can I change automatically the size of the GIF to match the length of the title ?

For example when the user select SMALLER
SMALLEST LARGER LARGEST on his browser.
PhLAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cookmysterCommented:
<img src="name.gif" width="50" height="50">

just replace the numbers with the length and/or width of the title.


Rich
0
mblaseCommented:
I don't think there's any way to detect what fonts the client browser has selected as their default. Why not use <U>...</U> instead?

Or, use a hyperlink trick:

<A HREF="#"><FONT COLOR="black">....</FONT></A>
0
PhLAuthor Commented:
Underline is quite poor...

How can compute the lenght of the tiltle ?

Any script ?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

mblaseCommented:
No, you can't compute the length of a string of text, because you can't be certain of what font is being used by the client browser. You can come close on *most* browsers, but it will never be reliable.
0
ozoCommented:
Could you use a <table>?
0
mblaseCommented:
Hmm, that's a good idea, ozo -- although you'd have to use a colored table cell and a single-pixel gif.

<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
  <TR><TD NOWRAP>
This is my title
  </TD></TR>
  <TR><TD BGCOLOR="black" HEIGHT=1><IMG
    SRC="pixel.gif" WIDTH=1 HEIGHT=1 ALT=""></TD></TR>
</TABLE>
0
egbservicesCommented:
If the size is so crucial why don't you create an image for the title too. This will retain the size and the font and your gif below it will always match the title.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SiteSeeCommented:
I have to agree with the last comment completely...you can make the image look like plain text if you really want to..and just keep it under 5kb and outside of a "loaded" table if you want it to appear quickly...

Steve
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.