therealwesfoster Posted July 7, 2009 Share Posted July 7, 2009 Let's say I want to have an HTML button have 2 lines of text, for example (neither of the following codes work. they are just examples of what I need to do): <input type="submit" name="button" value="Line1\nLine2" /> <input type="submit" name="button" value="Line1 Line2" /> How can I achieve this? Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/ Share on other sites More sharing options...
rhodesa Posted July 7, 2009 Share Posted July 7, 2009 this works for me: <input type="submit" name="submit" value="Line1 Line2" /> you can also use CSS to add a fixed width and then add "white-space:normal" Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870591 Share on other sites More sharing options...
therealwesfoster Posted July 7, 2009 Author Share Posted July 7, 2009 I'll try the css trick and see what happens. But the code that works for you, doesn't work for me in FF Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870595 Share on other sites More sharing options...
rhodesa Posted July 7, 2009 Share Posted July 7, 2009 the CSS way is: <input type="submit" name="submit" style="width:5em;white-space:normal;" value="Line1 Line2" /> Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870600 Share on other sites More sharing options...
therealwesfoster Posted July 7, 2009 Author Share Posted July 7, 2009 The CSS trick worked, although ugly as a goat (because I had to do a lot of ). Any insight on change font sizes or colors while INSIDE of a button? Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870602 Share on other sites More sharing options...
rhodesa Posted July 8, 2009 Share Posted July 8, 2009 what was i thinking...just use a button instead: <button type="submit">Line 1<br />Line 2</button> Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870687 Share on other sites More sharing options...
haku Posted July 8, 2009 Share Posted July 8, 2009 value="line 1<br/>line2" has worked for me in the past I think. Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870701 Share on other sites More sharing options...
rhodesa Posted July 8, 2009 Share Posted July 8, 2009 value="line 1<br/>line2" has worked for me in the past I think. nah...value doesn't support HTML edit: in fact, i don't think any dom attribute renders html in it's value Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870732 Share on other sites More sharing options...
therealwesfoster Posted July 8, 2009 Author Share Posted July 8, 2009 what was i thinking...just use a button instead: <button type="submit">Line 1<br />Line 2</button> Nice I don't think I've ever used the button tag. As for your latest reply, I don't think they do either. Thanks bro Link to comment https://forums.phpfreaks.com/topic/165101-multiple-lies-on-submit-button/#findComment-870757 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.