Just installed the interesting Drupal Advertising Module by Jeremy at Kerneltrap.org. Like Drupal, the module seems to be powerful, but configuring it is a bit of a pain since you need to visit so many different administrative sections to get it all up and running. Having said that, it seems to be pretty good and I will be putting it into production here in the near future to supplement Adsense earnings.
So, what I was trying to do was run the ad in a block. The problem here is that it doesn't allow you to modify the HTML code before the Javascript that it uses so that I could center the image ad in the block.
The hack solution to this problem for me was to generate an "external" ad link, which the module allows you to do so that you may run the ad on multiple websites on other installations of Drupal, or anywhere else I would imagine. So, I created a regular Block and then put in this code for an externally placed ad inside <center></center> tags.
Is there a better way of doing this? Probably, but this seems to have worked for me, and offers me some flexibility for the future in case I wish to change something else as well with HTML.
Just to update, I was able
Just to update, I was able to get it centered with (what I think to be) proper CSS by:
1. Opening my theme's style.css file and adding at the bottom:
.advertisement {margin:3px 0px; padding:0px;text-align:center;
}
#Content {
width:135px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
You can fiddle with the numbers if you like to adjust various factors. Like I said before, I don't really know CSS too well (another project for summer)
Hey,Thanks for the reply. I
Thanks for the reply. I figured there probably was a better way, I just found a quick-and-dirty way, especially since I'm not all that familiar with CSS (or even HTML for that matter), such is what I like about Drupal :)
-Dan
Centering, etc
Post new comment