CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
Safari breaks line with just a space
Frantiq
Permalink to comment
#
July 2011
Hi. I keep hitting this strange bug in Safari 5.0.5 where the text "Log in" somehow gets broken in to two rows.
The strange thing is: if i put
instead of a normal space, it works. It also works if I use a big I, like "Log In".
The same thing happens on some of my buttons.
Any idea on how to fix it?
The css-code for the link is just float: left; margin: 0 7px; and a color. I tried to set the height on it, but that did not work.
Many thanks if someone can help me.
Frantiq
Permalink to comment
#
July 2011
I'm so dumb. I totally forgot the
white-space: nowrap;
thing. But why did the problem occur in the first place?
TheDoc
Permalink to comment
#
July 2011
I can't seem to replicate your problem in Safari 5.0.5.
http://jsfiddle.net/TVsk3/
It sounds like there is probably a width being declared somewhere.
Add a Comment
The strange thing is: if i put instead of a normal space, it works. It also works if I use a big I, like "Log In".
The same thing happens on some of my buttons.
Any idea on how to fix it?
The css-code for the link is just float: left; margin: 0 7px; and a color. I tried to set the height on it, but that did not work.
Many thanks if someone can help me.
http://jsfiddle.net/TVsk3/
It sounds like there is probably a width being declared somewhere.