1. childNodes[] is inconsistent among browsers. Some browsers, like Mozilla, count all the possible text nodes (the "gaps" between the tags) as childNodes, others, like IE, count only some of them or none. As a result childNodes[1] might designate different elements, according to the browser. Use getElementsByTagName() instead.

2. A DIV element is a block level element, thus it can not have the display inline. You should use the value: block