line break in a button?
- Started
- Last post
- 16 Responses
- QuincyArcher
is it possible to put a line break in the text in a basic HTML button?
- acescence0
you can change the content of a button with js after the page loads and insert a newline character where you want it to break...
or use the tag
- acescence0
oops... it removed my tag.. meant to say the < button > tag
- QuincyArcher0
heh, version3.
Alright, so JavaScript...i'll check it out, thanks.
- acescence0
a button jackass, not a text link
- version30
that would be a < form > button then wouldn't it now?
sorry for the misunderstanding Quincy
fuck off acescence
- acescence0
XO
- QuincyArcher0
not a big deal, version3. i thought it was kind of funny.
I found a way to do it...but it sort of exploits innapropriate browser behaviour....
if you put a real line break in the text (in the HTML)...well, it works, but always renders the button at 100% width...
- thismanslife0
I found a way, I think... just uploading it...
- thismanslife0
Is this what you mean?
http://www.thismanslife.co.uk/te…Tested on IE6 and FF1.5, XP
- acescence0
doesn't work in safari
- madirish0
works in Camino/FF OS X
- version30
doesn't work in opera on pc either.
the code validates through W3C though I think its more of an exploitation than a solution
- thismanslife0
Didn't think it's work in everything, still, damn.
I bet there's a way, or a combination of ways for all browsers....
However, it's always a bit of a bad idea putting hacky tricks on things like this, as it's obviously, potentially, an important part of a page, if you risk breaking it's functionality, don't do it.
- acescence0
i think you can make it work in safari if you pad the button, but then it will f up other browsers...
- thismanslife0
Sorry, i meant:
"breaking its functionality..."not "it's"...
For the grammar nazis!