我如何包装在Opera按钮上的文字? [英] How can I wrap button text in Opera?
问题描述
我几乎创建了一个网站,在所有主要浏览器完美的作品。昨天,我庆祝,因为这是真的。今天,我发现事实并非如此。
I have almost created a website that works in all major browsers flawlessly. Yesterday, I celebrated because that was true. Today, I found out that it is not.
显然,Opera将不会按钮换行。我想,在我的搜索弹出一切 - 从间距过时的Mozilla Firefox浏览器的黑客
Apparently, Opera won't wrap text on buttons. I tried everything that popped up in my searches - from spacing to outdated Mozilla Firefox hacks.
我怎么能告诉歌剧包装上的一个按钮的文字?缩短文本是不是一种选择,因为它可以在最短的时间仍然过长。
How can I tell Opera to wrap text on a button? Shortening the text is not an option, as the shortest it could be is still too long.
下面是一个的jsfiddle: http://jsfiddle.net/JavaAndCSharp/grX4H/
Here is a JSFiddle: http://jsfiddle.net/JavaAndCSharp/grX4H/
推荐答案
嗯,是的,它呢?我甚至没有做任何其他比定义按钮的宽度。我建议你有冲突的CSS。
Uhm, yes it does? I didn't even do anything other than define the width of the button. I'd suggest that you have conflicting CSS.
HTML
<button>This is really long button text that should wrap after I define a fixed-width.</button>
CSS:
button{
width:60px;
}
输出:
您更新后编辑 http://jsfiddle.net/CJbae/
HTML
<form>
<button id="littleWorld" type="button">really really long text that will probably overflow on opera</button>
</form>
CSS:
#littleWorld{
border-radius:40px;
border-width:0px;
width:250px;
height:250px;
background-color:#808080;
font-family:Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold;
color:#FFFFFF;
}
这篇关于我如何包装在Opera按钮上的文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!