opportunist86 — 2012-04-19T04:52:22-04:00 — #1
I want to put two adsense boxes before my content in such a way that both boxes appear together. Like on this page.
ralphm — 2012-04-19T05:00:40-04:00 — #2
They haven't done that very well. Firstly, they use outdated code to make that happen, and I don't see the point, as it just repeats the ads!
Anyhow, if you really want to do this, create two divs, give them a width a bit less than half the width of the content area, set them to float: left; or display: inline-block; and then paste the Google code inside each of them.
opportunist86 — 2012-04-19T05:11:17-04:00 — #3
My site is on wordpress and I'm using following code to wrap my content around adsense box.
<div style="float: left; margin: 3px 3px 3px 3px;"> code</div>
I put two divs, one with left and other with right but not getting what I want. Can you guide a little bit more?
ralphm — 2012-04-19T09:28:32-04:00 — #4
It's better to put the styles in your external style sheet, but I'll put them inline here for demo porpoises. You need to give the boxes a width or floating won't do anything. Ideally, we should see your page (or some demo code) to know what circumstances you're working within (fixed width wrapper? etc.), but here's a possible way to go:
<div style="float: left; margin: 2%; width: 40%;"> code</div>
If your content area has a fixed width, you could change the width and margins to pixels, but mixing pixels and % is a bit hit and miss.
opportunist86 — 2012-04-19T09:40:07-04:00 — #5
ralphm — 2012-04-19T10:42:22-04:00 — #6
OK, try changing the styles on that container div to:
<div <font color='"#FF0000"'>style="float: left; margin: 3px 10px 3px 3px; width: 330px;"</font>> </div>
and then duplicate it so that there are two.
opportunist86 — 2012-04-19T12:15:41-04:00 — #7
You are great mate!
Thank you very much. its done finally.
How do you know so much about CSS and html. Have you learned it specially or just on interent?
ralphm — 2012-04-19T19:50:34-04:00 — #8
Just from books, hanging around here, and practice. But I don't know much really ...
Glad to help, anyhow.