If I postition elements of a site using div layers and put just the adsense code in a seperate layer will the code take the whole page content to decide the ad or will it be restricted as it is placed in a div layer without any other content? Sorry if I got something messed up.
Google will take the whole page's content to decide what ads to show. Using divs to position content doesn't chop the page into pieces. It's just another way to lay out your page.
Google considers whole content. But, you can specify specific content or div enclosures to have higher precedence by using section targeting. It goes on like this, <!-- google_ad_section_start --> <!-- google_ad_section_end --> For more info, see this page https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=23168