Download "Fit text in box" script

Demo

Put this into your <HEAD> section

Put this into your <BODY> section

How to use

You use this script by defining a <DIV> with an ID. This div should contain one <SPAN> tag which holds the text. Example:
<div id="theBox"><span>www.dhtmlgoodies.com</span></div>
<script type="text/javascript">fitTextInBox('theBox');</script>

The fitTextInBox() function will autofit the text into it's parent DIV. The arguments to this function is the ID of your DIV. The second argument is optional. Use it if you need to define a maximum height. The width of the div is set in the CSS:
  #theBox{
    width:500px;
    border:1px solid #CCC;
    color: #317082;
  }

Comments

LloydAbnot
<a href=https://www.cafemumu777.ru/>https://www.cafemumu777.ru/</a>
LloydAbnot at 12:58PM, 2023/03/05.
faofg469
<a href="http://blackpearlbasketball.com.au/index.php?option=com_k2&view=itemlist&task=user&id=637401
"> </a>
faofg469 at 01:00AM, 2023/03/14.
cblee233
<a href="https://bit.ly/human-design-rutube ">human-design-rutube</a>
cblee233 at 07:35AM, 2023/04/04.
jtxfh405
https://vk.com/id795042031?w=wall795042031_233
jtxfh405 at 06:36PM, 2023/04/23.

Post your comment

Don't have an avatar? Create one at Gravatar.com.

Confirmation code:

Go to cbolson.com


About/Contact | A good idea? | Submit a script | Privacy notice
© 2005 - 2024 dhtmlgoodies.com