treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Safari breaks line with just a space

  • 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.
  • I'm so dumb. I totally forgot the
    white-space: nowrap;
    thing. But why did the problem occur in the first place?
  • 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.