Hi

I am badly stuck at my layout due to Adsense... I Have prepared the following website using html and its all well till I dont insert Google ads.

Can anyone tell me where I need to make changes? Will be really grateful...!!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
-->
<html>
<head>
<title>
Prob with ADSENSE.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="keywords" CONTENT="Prob with ADSENSE.">
<meta name="description" CONTENT="Prob with ADSENSE.">
<style type="text/css">
body { background-image: url("D:/Prob with ADSENSE./Prob with ADSENSE/Prob with ADSENSE.gif"); font-family:Verdana; font-size:12px; } </style>
</head>

<img src="D:/Prob with ADSENSE/Prob with ADSENSE/Prob with ADSENSE.gif"alt="Prob with ADSENSE." align ="right" width="90" height="90">
<img src="D:/Prob with ADSENSE/Prob with ADSENSE/Prob with ADSENSE.gif"alt="Prob with ADSENSE." "align ="left"width="238" height="180">

<div style="position: absolute; left: 130px; top: 230px; color: orange; width: 550px; padding: 8px; background: yellow; ">
<p align="center"><b>
[<a href="navigate1.html">navigate1</a>]
[<a href="navigate2">navigate2</a>]
[<a href="navigate3.html">navigate3</a>]
[<a href="navigate4.html">navigate4</a>
]
[<a href="navigate5.html">navigate5</a>]</b></p>
</div>

<div style="z-index: 2; position: absolute; left: 250px; top: 15px; background-color: White; width: 350px; padding: 10px; background: transparent;">
<h1>Problem with Adsense1</h1>
<p><h2>Problem with Adsense2</h2></p>
</div>


<div style="position: absolute; Left: 50px; Top: 800px; background-color: #FFFFCC; padding: 5px; color: black; width: 675px; border: 5px white groove; font-size: 10pt;">Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1<p>TProblem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>
<p>Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1. Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>

</div>


<script type="text/javascript"><!--
google_ad_client = "pub-00000000000000000";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

<div style="position: absolute; Left: 50px; Top: 800px; background-color: #FFFFCC; padding: 5px; color: black; width: 675px; border: 5px white groove; font-size: 10pt;">Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1<p>TProblem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>
<p>Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1. Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>
</div>


<script type="text/javascript"><!--
google_ad_client = "pub-00000000000000000";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


</div>

<div style="z-index: 1; position: absolute; left: 100px; top: 1250px; background-color: orange; width: 550px; padding: 4px;background: transparent; font-size: 10pt;"><p align="center"><b>
[<a href="index.html">
Home</a>]
[<a href="FAQ.html">FAQ</a>]
[<a href="terms.html">Terms</a>] </b></p>
</div>

<div style="z-index: 2; position: absolute; left: 240px; top: 1260px; background-color: White; width: 650px; padding: 10px; background: transparent;font-size: 7pt;"> Copyright © 2007 ABC. All rights reserved</div>

<div style="z-index: 2; position: absolute; left: 130px; top: 1270px; background-color: White; width: 640px; padding: 10px; background: transparent;font-size: 10pt;"><b>Prob with ADSENSE.</b></p>
</div>
</body>

</html>

Dani AI

Generated

This thread already contains the root clues: spotted a malformed script include, suggested isolating ad code into its own block, and both and correctly warned not to hand-edit AdSense code. The symptoms you see (layout break when ads are added) usually come from one or more of those problems plus serving the page from the local filesystem and invalid HTML structure. Fix those first before changing layout rules.

Quick checklist to diagnose and fix the problem:

  • Serve the page over HTTP/HTTPS (not file://). Many ad scripts won’t run from local disk; run a tiny local server to test.
  • Look for HTML/JS syntax errors (missing or unclosed tags). A single unclosed <script> or mismatched block tag breaks subsequent DOM and scripts.
  • Validate the markup (avoid putting headings inside <p>, make block-level structure correct). Fix nesting errors and stray closing tags.
  • Put the ad code inside its own block-level container (div) with an explicit width/height; do not nest it inside other inline elements. That addresses ’s point.
  • Avoid editing the publisher script itself. Style the wrapper via CSS, not by altering the ad snippet. Follow and on this.
  • Check the browser console and Network panel for blocked resources, 404s, or mixed-content warnings (HTTP content on an HTTPS page).

Work flow that usually helps: create a minimal test page with only your page shell and the ad in its own container. If the ad appears there, reintroduce layout pieces one at a time until it breaks—this isolates which CSS or element is hiding or conflicting with the ad (z-index, absolute positioning or overlapping elements are common culprits). Validate and correct the full page once the ad works in isolation.

You tried putting them into their own div's?

Hi

I am badly stuck at my layout due to Adsense... I Have prepared the following website using html and its all well till I dont insert Google ads.

Can anyone tell me where I need to make changes? Will be really grateful...!!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
-->
<html>
<head>
<title>
Prob with ADSENSE.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="keywords" CONTENT="Prob with ADSENSE.">
<meta name="description" CONTENT="Prob with ADSENSE.">
<style type="text/css">
body { background-image: url("D:/Prob with ADSENSE./Prob with ADSENSE/Prob with ADSENSE.gif"); font-family:Verdana; font-size:12px; } </style>
</head>

<img src="D:/Prob with ADSENSE/Prob with ADSENSE/Prob with ADSENSE.gif"alt="Prob with ADSENSE." align ="right" width="90" height="90">
<img src="D:/Prob with ADSENSE/Prob with ADSENSE/Prob with ADSENSE.gif"alt="Prob with ADSENSE." "align ="left"width="238" height="180">

<div style="position: absolute; left: 130px; top: 230px; color: orange; width: 550px; padding: 8px; background: yellow; ">
<p align="center"><b>
[<a href="navigate1.html">navigate1</a>]
[<a href="navigate2">navigate2</a>]
[<a href="navigate3.html">navigate3</a>]
[<a href="navigate4.html">navigate4</a>
]
[<a href="navigate5.html">navigate5</a>]</b></p>
</div>

<div style="z-index: 2; position: absolute; left: 250px; top: 15px; background-color: White; width: 350px; padding: 10px; background: transparent;">
<h1>Problem with Adsense1</h1>
<p><h2>Problem with Adsense2</h2></p>
</div>


<div style="position: absolute; Left: 50px; Top: 800px; background-color: #FFFFCC; padding: 5px; color: black; width: 675px; border: 5px white groove; font-size: 10pt;">Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1<p>TProblem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>
<p>Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1. Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>

</div>


<script type="text/javascript"><!--
google_ad_client = "pub-00000000000000000";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

<div style="position: absolute; Left: 50px; Top: 800px; background-color: #FFFFCC; padding: 5px; color: black; width: 675px; border: 5px white groove; font-size: 10pt;">Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1<p>TProblem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>
<p>Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1. Problem with Adsense1.
Problem with Adsense1 Problem with Adsense1
Problem with Adsense1</p>
</div>


<script type="text/javascript"><!--
google_ad_client = "pub-00000000000000000";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


</div>

<div style="z-index: 1; position: absolute; left: 100px; top: 1250px; background-color: orange; width: 550px; padding: 4px;background: transparent; font-size: 10pt;"><p align="center"><b>
[<a href="index.html">
Home</a>]
[<a href="FAQ.html">FAQ</a>]
[<a href="terms.html">Terms</a>] </b></p>
</div>

<div style="z-index: 2; position: absolute; left: 240px; top: 1260px; background-color: White; width: 650px; padding: 10px; background: transparent;font-size: 7pt;"> Copyright © 2007 ABC. All rights reserved</div>

<div style="z-index: 2; position: absolute; left: 130px; top: 1270px; background-color: White; width: 640px; padding: 10px; background: transparent;font-size: 10pt;"><b>Prob with ADSENSE.</b></p>
</div>
</body>

</html>

<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

is wrong

it should be

<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>


This will solve your problem. Visit for such problems solution.

may be you manuall edit ur adsense codes.don't do taht.I've adsense sites.But no probelm yet.


Regards

same as above

do not and mean it DO NOT edit the adsense codes your self

you can put them in any tables or div, but do not edit them urselves.

chill.
www.gaeso.org/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.