views:

46

answers:

1

Hi, I just fixed a spacing bug on a HTML page I have inherited - and I worked out in the end that on that particular page this being at the top of the page was pushing the layout out;

<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"&gt;
</script>

I understand that it's good sometimes to place javascript right at the end of the Doc, but in this case Im wondering if moving this will cause any problems - it certainly fixes the layout ! Thanks

+1  A: 

Please read the explanation here http://adwords.google.com/support/aw/bin/answer.py?hl=en&amp;answer=115794#

The script MUST be as close to the </body> tag as possible

mplungjan
Hi, Had a look - and it seems to be that particular javascript line that pushes things out - even when in the header. Putting this at the end of the document before the end body sorts the problem, It was more I was wondering if by moving that script to the end, it would cause problems with the how the conversion.js integrates with the page
owen
can you please answer Bob's question? Browser version, platform, markup? There is no reason this script would interfere with positioning, especially not in the head of a page since it does not render anything or import a stylesheet or such
mplungjan
Erm. Sorry let me retract that. Stand alone I do not see this script adding anything to the page, but it can, so I would need to see how it reacts when it is fed with parameters most likely set before it in a script tag
mplungjan
Changed my answer. Found the explanation in the FAQ at the adwords help page
mplungjan
Cheers, thanks for all your help
owen