Non-breaking spaces for use in HTML and HTML-formatted email

170 Views Asked by At

I am working with a website that has its origins back in 2001. In those days tables were heavily used for layouts, and Internet Explorer was a dominant browser. Back then there was a requirement to use non-breaking spaces   in empty table cells to avoid losing borders. As a result, all the layout code creating cell contents had a wrapper function that would replace any empty cell with a non-breaking space.

Over the years, tables went away from our code base, as did the need to support versions of IE that had this quirk. However the wrapper function to put in the non-breaking space is still in place in our code.

In searching the web there are lots of references to non-breaking spaces and even some articles about the need for them with old versions of IE. However, I did not find anything that specifically addresses whether we can eliminate the practice described in this question completely.

My questions are as follows:

  1. Can this practice be eliminated for web pages that only need to display in modern browsers?

  2. Is there still a need for the non-breaking spaces in tables put into html emails? This is the important part of this question, as tables are still required for layout in emails as far as I know. And there are lots of email clients out there that are inaccessible to us for testing.

0

There are 0 best solutions below