Problem Centering Ad with CSS
-
I’m having a problem centering the ad above my page (http://www.covermesongs.com). It’s a rotating ad controlled by an external ad service. Whenever the ad displayed comes in Javascript or HTML format, it centers fine. If the ad is a jpg or gif file though, it remains left-aligned. This means half the time the ad is centered and half the time it isn’t. Refresh the page a few times and you’ll see what I mean.
I’ve been trying to figure this out in the CSS code I use to control the ad, but have come up nothing. Here’s what I’m using:
.banner-ad { display:block; margin-left:auto; margin-right:auto; text-align:center; margin-top:8px; }
Does anyone have any idea what the problem is, why this is centering Javascript and HTML ads but not image ads? Thanks so much!
(If it matters, I’m hosting the site on Bluehost and using the Suffusion template.)
- The topic ‘Problem Centering Ad with CSS’ is closed to new replies.