Just take a moment to check out this JavaScript Fiddle: http://jsfiddle.net/NtxG9/1/
I'm dealing with two divs here, both sharing the same class and they are set to display as inline-block elements.
Whenever I use $('#parent1').html('some text');
, it causes one of them to shift downwards.
Could anyone shed some light on why this happens?
Thank you!
UPDATE
Appreciate all the suggestions provided so far, but I'm still puzzled about the underlying cause for this behavior. What is the reason behind a div's position being affected by changing its content?