Non-breaking Space Fun

For you web developers, this should explain one of the biggest misteries in web developement.
Or maybe someone taught you that once, or you weren’t as stupid as I am, removing all those seemingly uneccessary non-breaking spaces in my Government’s web site…

So, this:

<p>Blabla « W3C » etc. whatever</p>

On a narrow page gives this:

Blabla « W3C
» etc.
whatever

This:

<p>Blabla «&nbsp;W3C&nbsp;» etc. whatever</p>

On the same narrow page gives this:

Blabla
« W3C » etc.
whatever

Yes, &nbsp;, or non-breaking spaces, concatenate whatever you put with it in one word, making the word wrapping of a citation correct. (Yes, &nbsp; are not only used to make an empty table square appear in IE)

XD


Share this!
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • LinkedIn
  • del.icio.us
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>