This is a discussion on "How to wrap Text in a button?" within the Web Page Design section. This forum, and the thread "How to wrap Text in a button? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
How to wrap Text in a button?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
How to wrap Text in a button?
Hi,
I need to wrap the text of button so that it fits in the button's fixed width and doesn't expand the button's width, only it's height. This can be done in a regular text using the WORD-BREAK:BREAK-ALL; attribute But I tried this on the button and it's not working? Is there any work around for that? any css attribute? |
|
|
|
|||
|
Re: How to wrap Text in a button?
Is the button a normal input (<input type=button>)? If not, could you tell us what it is?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: How to wrap Text in a button?
Yes it's a normal submit button
<input type=button value="ssssssssssssssssss"> and I have the button size like 10px for instance. I don't want the button to expand, I need to wrap the button's value to fit into the button's specified width |
|
|||
|
Re: How to wrap Text in a button?
If you want to write endless text without the width changing, you need to use css. Try this:
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: How to wrap Text in a button?
It doesn't work cause when you specify a width, the rest of the word won't appear
like if u have a value of 'ssssssssssssssssss' and your button's width is like 3px , only the first 3 characters will appear. |
|
|||
|
Re: How to wrap Text in a button?
So don't specify the button width! Let the button width determined by the button value..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: How to wrap Text in a button?
Hi,
The problem is that I need the button to be of fixed size and wrap the text inside it, so that it doesn't expand as it'll affect my page's layout |
|
|||
|
Re: How to wrap Text in a button?
Quote:
Of course if your button value is "ssssssssssssssssss", the button sure will be wider! But you want all of them to appear in your button tho... If you want a fixed width button, set the width as mention by swagner, and adjust your button value or, change your button onto an image button.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Last edited by Monie; Oct 29th, 2007 at 07:06. |
|
|||
|
Re: How to wrap Text in a button?
You say you have an <input type="button"> .. so it is actually a normal button.
So try this alternative
|
|
|||
|
Re: How to wrap Text in a button?
Yup, that is what I would have suggested next. Just use
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: How to wrap Text in a button?
Please mark this thread as solved via thread tools at the top. Thanks
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to text wrap? | Quetzal | Web Page Design | 9 | Jun 3rd, 2008 18:58 |
| button text picture change | R8515198 | JavaScript Forum | 7 | Feb 11th, 2008 12:36 |
| Picture wrap around text? (more info inside) | KOinMotion | Web Page Design | 1 | Nov 13th, 2006 09:59 |
| How to wrap text around a div | AdRock | Web Page Design | 6 | Sep 5th, 2006 19:02 |
| Text wrap - widening space | gribble | Web Page Design | 1 | Aug 17th, 2005 03:38 |