Hello, I just starting running some banner adds on my site. I have one on top and one on the bottom but they centered themselves all the way to the left of the screen. Is there a way or setting so I can have them centered left to right?
Thanks, John
www.CycleMadness.net |
Hello, I just starting running some banner adds on my site. I have one on top and one on the bottom but they centered themselves all the way to the left of the screen. Is there a way or setting so I can have them centered left to right?
Thanks, John
I have not played with banner adverts; I am assuming the ones you add with the admin banner tool, but would expect they are controlled by CSS.
Geeks, making the world a better place |
Hello, I just starting running some banner adds on my site. I have one on top and one on the bottom but they centered themselves all the way to the left of the screen. Is there a way or setting so I can have them centered left to right?
Thanks, John
Yes, in your banner settings, include <center> your banner code </center>
ManOfTeal.COM a Proud UNA site, six years running strong! |
i.e.
<center><script type="text/javascript"><!--google_ad_client = "ca-pub-****************";/* duvalcombanner */google_ad_slot = "7618500959";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></center>
ManOfTeal.COM a Proud UNA site, six years running strong! |
OK Cool... Thank you... Newton27 www.CycleMadness.net |
The center tag is actually depreciated but may still work. If you know the width of the banner, then you can use CSS to centre the banner; I would think that Boonex would have some CSS to control the banner but perhaps not.
<div style="width:XXpx;margin-left:auto;margin-right:auto><banner code here></div>
The XXpx is replaced with the width of the banner. For example, if your banner is 500 pixels wide, then you enter 500px. The margin auto only works if you set the width; there are discussions out on the net on centring a division of unknown width.
Geeks, making the world a better place |
The actual problem is dolphin puts the ad inside a table and dolphins css defaults all table cells to align left.
The center tag is the easiest way to correct it. And it is supported in every browser. Just not supported in HTML5. Meaning it will work in all browsers unless the doctype is explicitly set to html5. https://www.deanbassett.com |
The actual problem is dolphin puts the ad inside a table and dolphins css defaults all table cells to align left.
This is against proper coding. Tables are suppose to be used to display columnar data; it would appear in this case Boonex is using tables for presentational purposes. Then again, tables are used throughout the Dolphin code in places they should not be used.
Geeks, making the world a better place |
If it works, then use it.
However, for an academic discussion, the <center> tag was deprecated in HTML 4. The reason is that CSS is suppose to be used to control the presentation instead of markup. All HTML tags that handled presentation have been depreciated; <font> is another one. Of course to prevent breaking sites, browsers tend to be backward compatible for a certain time. Eventually though, a site owner needs to remove deprecated tags or risks their site becoming broken at some future time.
Geeks, making the world a better place |
I was the very first one to say exactly this ... even before GG first replied ... but I though maybe I was wrong as I don't use the Banners module for Dolphin and the solution sounded too simple (even though I know this usually works when centering things / ads in blocks etc), so I removed the post lol ffs ...
include <center> your banner code </center>
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Yes, I think the discussion was about the banner "module". As I said, if it works then go ahead and use it. However, at the same time we should be interested in proper markup and deprecated tags should be avoided.
I redid a site once that was created on Microsoft FrontPage. There were hundreds of font tags in the page code along with all other kinds of outdated markup and it was just a simple page. I wonder how many sites are out there that still contain deprecated tags? At some point, those sites will break apart when browsers remove that from the rendering engine.
Geeks, making the world a better place |
The center tag is actually depreciated but may still work.
That may be the case, but for this, it works and I have been doing it since I joined Boonex.
<div align="center"> never would perform correctly, so that is what I stuck with.
I use the banners extensively.
OT but the slide share widget works well in the banner module too.

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="right:50px;top:175px;">
<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a>
<a class="addthis_button_tweet" tw:count="vertical"></a>
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
<a class="addthis_counter"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-************"></script>
<!-- AddThis Button END -->
To me, the banner module serves it's purpose well GG, you should use it.
ManOfTeal.COM a Proud UNA site, six years running strong! |
We don't use it because our site was suppose to be advert free; member supported. And unless you have a large amount of traffic, adsense is a waste of time. Plus, Google's rules make it impossible as we would just get banned. Of course the banner area could be used for other purposes.
I might see about working on the test site for a clean solution to the alignment problem without using deprecated tags.
Geeks, making the world a better place |
Thanks guys... <center></center> Worked very well on the first shot and most of all it was an easy fix. And trust me... That's that what I need is "easy." Lol... www.CycleMadness.net |
And unless you have a large amount of traffic, adsense is a waste of time.
Banners are not just for Adsense, as in my prior post use of it.
ManOfTeal.COM a Proud UNA site, six years running strong! |