Grow your CSS skills. Land your dream job.

Safari breaks line with just a space

  • # July 5, 2011 at 9:51 am

    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.

    # July 5, 2011 at 9:54 am

    I’m so dumb. I totally forgot the

    white-space: nowrap;

    thing. But why did the problem occur in the first place?

    # July 5, 2011 at 12:16 pm

    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.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".