I have an AdSense account, and simply copy/pasted a block of Javascript to include ads on my site. However, since I did not put any HTML in place, the Js is generating an iframe and an ins element which the ads are appearing within.
I want to move those ads to the left of my content, where I have made space for them. I've tried adding CSS like "ins, iframe { position: absolute; left: 0; top: 0; }" but it seems to be overwritten.
So my question is: how can I force the AdSense ads to appear where I want them to? Preferably with CSS.
You do it the same way you use CSS to control anything else: put it in a div, give it a class (or id), and format the parent object.
Are you already using CSS? If so, just add a new one something like this in main.css
:
#google{
position:absolute;
right:0px;
width:160px;
top:120px;
border-left: 1px solid black;
}
Then in your page, where appropriate, add the following around Google's JavaScript:
<div id="google">
<--! code here -->
</div>