On Dec 13, 2010, at 22:26, LarryTX wrote:

> It is traditional to put a nonbreaking space in a cell that might be
> blank at some times because some browsers will ignore a cell that is
> blank, acting as if the <td></td> weren't there. The result is a
> trashed table.

I'm not able to find any other references to this phenomenon, and am not able 
to reproduce it in IE6, which Mark said was the browser that would experience 
it.


I am, however, able to find references to another reason for putting 
non-breaking spaces in an otherwise empty table cell: some older browsers, 
including IE6, will render the cell without its border if it is empty (and 
containing a non-breaking space does not count as being empty). These articles 
have ideas for alternatives:

http://stackoverflow.com/questions/57002/css-to-make-an-empty-cells-border-appear

http://stackoverflow.com/questions/2789372/a-better-alternative-than-nbsp-for-showing-empty-html-table-cells

http://www.cs.tut.fi/~jkorpela/HTML/emptycells.html

Given this, I'm going to remove the non-breaking spaces from my bake templates. 
I agree with the responder to the first Stack Overflow question who said he 
didn't want to dirty up his code for an IE display problem. If it turns out to 
be a problem later, I might look into the IE-targeted JavaScript solution 
mentioned there.



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to