I have 2 blocks with Google Ads.

The Footer block is aligned all the way to the left, and is a small box. I'm using it for adsense, and it's supposed to be 728x90. How can I make my block to be that size and have it centered?

Thanks for all of your help!

Comments

nevets’s picture

Use css to give the block a width and height. Also use css to set the left and right margins to auto.

IZasPIE’s picture

Use my template css or what css file? Not really sure to which file to do these changes...

nevets’s picture

Depend a little on the theme, by default I would put that at the end of style.css.

IZasPIE’s picture

Alright. Would it be something like this?

I already have this for footer:

#footer{
clear:both;
padding:5px;
width:920px;
}

And this is what I have for block:

.block{
clear:both;
padding-bottom:15px;
width:190px;
}

But I'm not sure if that's what I am actually needing...

nevets’s picture

Using .block is too general, you want to use the block id, it will be of the form block-module-delta, for example block-user-1 or block-block-5.

So the css would be something like (change the id used to match your block id)

#block-block-5 {
  width: 728px;
  height: 90px;
  margin: 10px  auto;
}
IZasPIE’s picture

How do I find out my block id?

nevets’s picture

I use the Firefox extension firebug to inspect the html. I tend to look at the block title and work backwards. Typically the title is in an h2 tag and the div holding that will have the block id. In general terms you are looking for something like <div ="block-module-delta" class="block block-module">, for example <div ="block-project-1" class="block block-project">. While this holds true for many themes it is not true for all. For ones that follow the convention, the div will have a class of 'block'.