Moving Buttons in IE7

The value value sometimes changes to really long, longer than 50 pixels.

<input type="submit" Value="Really long" style="width:50px; white-space:normal" />

This works fine in IE8 + and firefox, as the text on the button wraps on the next line.

The problem is that this should work in IE7 and the text does not wrap.

Does anyone know how to do this in IE7?

+3
source share
4 answers

A bit of shreds, but in IE7 this will be mostly correct:

 <input type="submit" Value="Really 
 long" style="width:50px; white-space:normal" />

Basically you should add a line break to your HTML. This "technique" is the job ... If you manually write your HTML, it will be an option, but if your code is generated (for example, ASP.Net), it may not work.

See this jsFiddle in IE7.

+2
source

, , IE7 . <input /> <button>, <span> display:inline-block, .

<button>
    <span style="display:inline-block">Long button text goes here</span>
</button>
+2

Not sure what you want to achieve, however you can try using the size attribute in the input tag, AS WELL as your css.

<input size="50" type="submit" Value="Really long" style="width:50px; white-space:normal" />

0
source

Paste <br />in the value and make sure it is doctypecorrectly specified.

-1
source

All Articles