Prevent ? (question mark) from being treated as a white-space like separator

Is there any way to prevent '?' from being treated as white-space-like in HTML/CSS? Is this default behavior, or am I doing something wrong? I have a div that holds a very long URL (the length is dynamic). I want the URL to treat the question mark as any other character and not force a line break at that character, but I *don't* want to use `white-space:nowrap;`, since that will cause the entire line to overflow out of the div, which is not a desired behavior. The desired behavior is for the text to wrap at the end of the div onto the next line, as it would if it weren't for the question mark. ![alt text][1] It likely doesn't matter, but here are their CSS properties: a{color:green; font-weight: bold;} .ycpreviewbox{ margin: 0 auto; padding: 2em; background-color: #C7E2ED;} . Here is how it behaves with a shorter URL: ![alt text][2] [1]: http://i.stack.imgur.com/YPNJU.png [2]: http://i.stack.imgur.com/NLmcs.png

以上就是Prevent ? (question mark) from being treated as a white-space like separator 的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏