HyperBPP
asked on
Getting text in html button to wrap
I am using CSS to define the height and width of some buttons on my page. However, the text inside the button will not wrap and gets clipped unless I set the overflow to visible; in which case it oversizes the button to accomadate the text. How do I get the text to wrap inside the button
<button class="largebutton">My text that overflows</button>
<button class="largebutton">My text that overflows</button>
I am not sure if this will work, but you can try this CSS style: word-wrap: break-word
Greets,
considering that the <button> tag will let you put html inside it... try
<button><span style="width:10px;display: block;">so me text</span><button>
Regards
Steggs
considering that the <button> tag will let you put html inside it... try
<button><span style="width:10px;display:
Regards
Steggs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The <br> will probably work for me though a bit of pain.
How about in the case of an <input type="submit" name="aButton" class="sizedbutton" value="#someCFvalue#">?
How about in the case of an <input type="submit" name="aButton" class="sizedbutton" value="#someCFvalue#">?
same deal with the inputs
if you have a server side language like CF, ASP or php, you could do character counts before you write out the button text and insert in <br>'s
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.