问题描述:

I have a new website I'm building and the CSS forces any text inside h2 tags to wrap whenever there is a space. Here's the site:

http://www.chainedpayments.com/CardSpire/

And here's the problem:

If I put "Low Fees" together without a space, and even add a few chars ("LowFeesABC"), it stays together and doesn't wrap. I don't know CSS well enough to know how to keep the text together. Any ideas?

网友答案:

It wraps because the element has a fixed width set on it and the text ”LOW FEES” does not fit into that width. Simply removing width:90px removes the wrapping.

网友答案:
#topPanel h2 {
    white-space: nowrap;
}

https://developer.mozilla.org/en-US/docs/CSS/white-space

相关阅读:
Top