Hi,
i need to add another "li" element to a list.
The "li" should be with 0 indentation.
When I statically write it (HTML/CSS), with ul/li margin/padding 0 - it
looks great.
When I dynamically add it (Javascript) - in IE (and not FF) it's ALWAYS
indented, no matter what!!
This is my javascript code:
var newLiElement = document.createElement('li');
newLiElement.style.padding = '0px';
newLiElement.style.margin = '0px';
List.appendChild(newLiElement);
newLiElement.parentNode.style.padding = '0px'; //even tried to update
the "ul" father node
newLiElement.parentNode.style.margin = '0px';
Even though - the div in IE looks like this:
List Header
first li
second li
But in FF the div looks like this (and this is the right scenario):
List Header
first li
second li
I event tried to define a new class with padding and margin 0 and use
newLiElement.className = 'no-padding-maring-class-name';
but it's still indented in IE.
How do I fix the IE to make it work???
Thanks, Anat.