The image ads in my right sidebar are sitting on top of each other, with no space in between. Is there a template-like file I can edit so that


tags are put between each image?

Comments

john franklin’s picture

Adding .tpl file is a good idea. Until we can get around to this, you can add the <hr/> with CSS:

.advertisement:before {
    content: "<hr/>";
}

.advertisement:first:before {
    content: "";
}
alagahd’s picture

The CSS solution in http://drupal.org/node/856800#comment-4207018 will insert code between ad blocks, but not between multiple ads in the same block. Since the code generated by this module calls a javascript, I see no easy way as yet to style these ads. Here's what the code looks like on my site for an ad block:

---

<div class="defaultblock"> 
    <h2></h2><!--block title--> 
   <div class="blockcontent"> 
<div class="advertisement group-tids-48" id="group-id-tids-48"><script type='text/javascript' src='http://domain.com/sites/all/modules/ad/serve.php?q=2&amp;t=48&amp;u=node%2F208&amp;l=home'></script></div> 
</div> 
</div> 

---

alagahd’s picture

Well, the documentation/README.txt does explain what to do: style the class ".image-advertisement". Even though the text "image-advertisement" appears nowhere on the source code, it seems to be generated by the javascript.

Here's the CSS I've used successfully to put space at the bottom of each image ad:

.image-advertisement {
	float: left;
	padding: 0 0 10px 0;
}
kirkcaraway’s picture

I have a similar problem. I have an ad block that has four button ads that display horizontally, embedded in the node text after the third paragraph. What I want to do is add a horizontal rule above and below this block, to separate it from the text and to prevent the text from running around the ads. I also want to only make this work for my embedded ad blocks, not the other ad blocks on the page.

I tried the solution in #1, but all it did was show the characters


at the top of all my ad blocks. I tried adding the ad group designation (.advertisement group-tids-412) and nothing showed up.

Can you give me a little guidance to figure this out? Thanks.

kirkcaraway’s picture

After a lot of messing with this, I'm still looking for a solution to this. It seems so easy, but nothing has worked. Even my CSS guru failed.

The code from #1 still looks the most promising, but when I use that, the


tag appears above the ad block, but doesn't format to show an actual horizontal rule. And nothing shows underneath the ads. I've tried changing the input format to accept

tags, but nothing changed. Not sure how this tag is displaying but not formatting.

The other problem is targeting this to the right ad block, since there is another ad block on the page.

It seems the problem is because this CSS is trying to style something served up by javascript.

Does anyone know a way around this? Thanks.

lrwebks’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!