So I have a submit button with a specified width and the containing text is pulled in from elsewhere, it’s dynamic. The problem is that in ie7, the text does not overflow properly and wrap onto a second line, it just runs off into oblivion!
Here is the html.
<input type="submit" value="<?php echo $dynamic_data ?>" class="custom-submit">
And the css.
.custom-submit {
height: 76px;
white-space: normal;
width: 140px;
}
I have seen people suggest elsewhere to put line breaks into the button’s text but this will not work for me as the texts length is dynamic.
Any ideas?
I have a similar problem with buttons containing dynamic localized strings.
The best solution would probably be not to use the
<button>tag at all. You can replace it with<a>tags styled as buttons. IE seems to handle wrapping fine in that case.In my case, thats not an easy option. So I made a polyfill that patches the IE rendering:
http://jsfiddle.net/dmitrytorba/dZyzr/247/