PDA

View Full Version : How do You Center the Leaderboard ... ?



ugain98
05-10-2011, 07:32 PM
Hey guys,

Whether I'm using a 300pix Side Bar or a 160pix wide on the left Navigation, I want to center the Leaderboard Ad just under the nav underneath the header.

I'm using align center in my HTML but the Ad is still shifted align left.

Here is the code:

<a rel="nofollow" href="http://www.mydomain.com/go/dogtrain" target="_blank"><img class="aligncenter size-full wp-image-196" src="http://www.mydomainx.com/wp-content/uploads/2011/05/728x90.jpg" alt="title="dog train" width="728" height="90"/></a>

Why wouldn't this be working?

EHiatt121
05-10-2011, 07:44 PM
Can you share a URL?

ugain98
05-11-2011, 04:00 PM
Sure,

here is another example:

<a href="hxxp://myaffiliatelinkdotnet/"><img class="aligncenter size-full wp-image-196" src="hxxp://www.100percentwinnersdotcom/nuts/728z90A.jpg" alt="" /></a>

dismiss the xx in http, the dotcom & dotnet

100 percent winners (http://www.100percentwinnerss.com/)

Dan Nickerson
05-11-2011, 05:59 PM
It's because the top ad css is only 728 wide.

You need to edit the css.


.top728 {
width: 728px;
height: 90px;
background-color: #FFFFFF;
float: left;
overflow: hidden;
}

.side190 {
width: 220px;
height: 90px;
float: right;
overflow: hidden;
}

Try changing to


.top728 {
width: 948px;
height: 90px;
background-color: #FFFFFF;
//float: left;
overflow: hidden;
}

//.side190 {
width: 220px;
height: 90px;
float: right;
overflow: hidden;
}

ugain98
05-11-2011, 07:01 PM
Terrific Dan ..... that did the trick.

How can I change the Side Bar width to widen it a little from your standard 150px to something more like @170-175px so I can accommodate a 160px width Tower Ad.

Thanks

ugain98
07-15-2011, 04:55 AM
Dan,

I'm retyping the issue I PM'd you back on this thread because I went ahead and did as you suggested which was to re-download the latest version of Socrates .... but I still have the same problem of my Leaderboard Banner being sliced in half and not fully showing.


I used the code you offered below to center the Leaderboard AD successfully on a few other sites but for some odd reason, the Leaderboard ad is getting chopped in 1/2 and not showing fully on this new site H Miracle (http://www.hmiracleh.com/).

The Ad itself is rather proportionate so it isn't the Ad.

The left Side Bar is adjusted correctly and resized from code you also gave me, so no issues there.

I disabled my W3 Total Cache plugin but that did nothing for me.

What are your thoughts.



Thanks

Dan Nickerson
07-15-2011, 07:30 PM
im really baffled by this.. if you restore to default code does the 728 banner display correctly in the left hand position.?

Sorry for the delay, I'm traveling this week.

ugain98
07-15-2011, 08:24 PM
Dan,

I switched it back to this:

.top728 {
width: 728px;
height: 90px;
background-color: #FFFFFF;
float: left;
overflow: hidden;
}

.side190 {
width: 220px;
height: 90px;
float: right;
overflow: hidden;
}

from this:


.top728 {
width: 948px;
height: 90px;
background-color: #FFFFFF;
//float: left;
overflow: hidden;
}

//.side190 {
width: 220px;
height: 90px;
float: right;
overflow: hidden;
}

and it shows up fine but simply not centered.

Thoughts?

Thanks

Dan Nickerson
07-16-2011, 10:10 AM
Now change to this..

.top728 {
width: 948px;
height: 90px;
background-color: #FFFFFF;
float: left;
overflow: hidden;
}

//.side190 {
width: 220px;
height: 90px;
float: right;
overflow: hidden;
}

ugain98
07-16-2011, 10:38 AM
Thank you very much Dan for your help.

That worked.

I see that the forward slashes // were removed, but don't understand why this would have needed to change if the original is working on my other niche sites.

Kind regards for your genuine effort and help.

ugain98
08-24-2011, 10:58 AM
Hi Dan,

I'd like to not start another thread regarding this next issue since it's somewhat related unless you'd like to move it.

I have used the code supplied by you successfully using Banners on other sites, however, I started a different website integrating Adsense and the ads at the top of the site do not center.

Can this be fixed or is this an Adsense issue.

Here is the Domain/URL : Limo Services (http://www.limoservicesx.com/phoenix-airport-limousine-services-tips-for-choosing-a-phoenix-airport-limo-service)

lynnth
08-24-2011, 11:06 AM
I'm assuming that you want to center the Adsense block within the leaderboard. If so you can put <center> before the adsense code and </center> after it.

ugain98
08-24-2011, 01:32 PM
You know, sometimes it's simply the obvious things that we tend to miss that are right in front of you.

Earlier on I was fooling with the Leaderboard by placing some gibberish text in it and centering it, but somehow the idea of placing the HTML code for centering the actual Adsense Code itself eluded me. Too much on my mind or early senility I suppose. WOW.

Thanks