Text too long…? Not wrapping, or pushing other elements around…? I wrote this little function to trim text to any length, adding ‘…’ at the end if trimmed. Then, it displays the full text as you hover over it. Cooool!
OK, Bear with this, its quite handy when you understand it.
<div>, <p>, <h1>, <form>, <ul>, and <li>
* Always begin on a new line
* Height, line-height and top and bottom margins can be manipulated
* Width defaults to 100% of their containing element, unless a width is specified
<span>, <a>, <label>, <input>, <img>, <strong> and <em>
* Begin on the same line
* Height, line-height and top and bottom margins can’t be changed
* Width is as long as the text/image and can’t be manipulated