a element could not contain div inside. So tidy filter corrects this case on reRender.
Got it, just checked the html reference and a can only contain inline elements of which div is not one :).
Interestingly enough though the page renders first time with div's inside an a and only on the ajax call does it not.
Anyway, that's all good thanks for your help
you may switch off tidy filter and your divs will be inside as it was before. But it's better to use fully strict layout to be sure that page will not be crashed after DOM updates within illegal HTML.