0

I'm attempting to insert and position new DIVs before and after arbitrary 'target' elements on a page with jQuery (.before and .after) In some cases, after the DOM insertion, the browser will render the new DIV without respecting the target element's padding, other times it will? I realize there's other issues that can complicate this (positioning, margins, etc) but I'm not sure why there's a difference? Would it have to do with the target element type or some constraint on the common parent?

Thanx, Chris

Chris
  • 3
  • 3
  • feeling dumb - its mainly due to the sibling object's display properties... – Chris Sep 07 '12 at 17:30
  • Update is that some differences are caused by Display but others are still unexplained. Still have situations where objects are inserted below or on top of existing items when the targets seem identical in every way. Can anyone recommend a good reference that explains how positioning is calculated? – Chris Sep 07 '12 at 20:31

0 Answers0