Divs on same line

Absolutely, that was the main reason behind the method.

Back when I wrote the code in 2010’ it was part of a cross browser method that would display the same in IE- 6,7,&8 and all other current versions of modern browsers at that time.

We didn’t have full support for display:table yet due to IE6,7 still needing support. It was IE- 6&7’s behavior of inline-blocks that inspired the removal of the white-space nodes.

When they were in ‘haslayout’ mode they would ignore the white-space even with line breaks between them, they would act like floats. Their behavior is really what I wanted out of all other browsers since we needed a way to center widthless nav elements in horizontal menus.

Everything was working fine with negative values on word-spacing in IE8 and Firefox. It was Chrome & Safari that became the problem with the webkit’s broken negative word-spacing modal. The magic bullet was display:table on the parent to bring them in tune with all other browsers.

Before that we fought with all the font-size:0 tricks and tag chaining to try and kill the nodes. Things are different now with old IE dead and gone. But it’s good to know all the different ways that the white-space can be dealt with.

My comments from post#4 were just my personal observations of the methods, that’s all. :slight_smile:

3 Likes