Shrihari - Photo
GotBanners – Making 2 Columns
December 20th, 2007
23 Comments

If you have installed GotBanners and if it displays only one columns of banners, here is your solution. I started getting a lot of mails asking me how to do it. So, here is the answer. Its fairly simple.

It purely depends on the space you have. You need to have atleast 290px width to accommodate 2 rows of 125×125 banners. Because, GotBanners automatically adds 5px margin to each banner. If you have lesser space, alter this line in gotbanners.php :
echo "<style>.gotbanners { text-align: center; } .gotbanners img { margin: 5px; } </style>";
Change the 5px to something lesser. If you just have 250px, you’ll have to change it to 0px.

Hope its clear for everyone. If you have any other questions, feel free to contact me.

23 Responses to “GotBanners – Making 2 Columns”
Trackback URL Feed for this entry
xHTML Coding  -  December 21st, 2007 at 4:40 pm  -  #1

Well since GotBanners plugin supports HTML what do you say about simply adding br at the end of each banner

Hari  -  December 21st, 2007 at 4:45 pm  -  #2

That is not at all required. Because, GotBanners automatically aligns the banners into different lines.

By the way, i think you have not understood the topic of this post. This post is about how to make 2 columns and not 2 rows…

Jason  -  December 21st, 2007 at 8:15 pm  -  #3

I’m still confused?. What part of the code above is telling gotbanners to split into 2 columns? All that seems to be doing to me is making the column spacing less than 5px? Are you sayoing that gotbanners looks at the TD width first to determine if it will go 1 column or two automatically?

Sorry if I appear stupid

Hari  -  December 22nd, 2007 at 2:47 am  -  #4

Basically, GotBanners displays all the banners as such. It just adds a 5px margin andthe displays as banner1, banner 2 etc… If you do it normally, they will not be aligned. So, i used a <center> tag so that the banners will be aligned properly irrespective of the number of columns. Now, a banner goes to the next line only if it has insufficient space in the first line. So, if we reduce the margin, we give the next banner more space…

I hope that is clear :D

Robert Irizarry  -  January 4th, 2008 at 5:15 am  -  #5

I just wanted to take a moment to thank you for GotBanners. I’m running it in a test blog to display two rows with 3 buttons each and it works great!

Jason  -  January 6th, 2008 at 1:13 am  -  #6

Thanks I was looking for something like this and your plugin works great.

alex  -  January 12th, 2008 at 2:24 pm  -  #7

Hi admin!
My blog has error when i setup your plugin , my blog is WordPress 2.3.1 , how to do i must now ? pls help me , thank you

Hari  -  January 12th, 2008 at 5:56 pm  -  #8

Haven’t tested it on 2.3+. So, i might not work.
Never mind about that. My next project is about to be launched. Does all what GotBanners does and also has many extra features : Rotatee

Jim  -  January 19th, 2008 at 4:24 am  -  #9

Tested this and it is working great.

I wanted to make it to show just 2 ads though. In the current configuration, the script only displays ALL of the ads in a random order.

To fix this:
edit gotbanners.php around line 80 to this

for($j=0; $j

Hari  -  January 19th, 2008 at 8:20 am  -  #10

Hey Jim,
As i’ve been saying, my new project Rotatee.com has a solutiong for this too. You can display any number of banners at a time…

jason  -  February 3rd, 2008 at 1:31 am  -  #11

I am working getting two columns, but it isn’t working. I have exactly 250px of space, and have modified the code per your instructions an nothing. I have even removed the center tag, but no luck. Any ideas?

Hari  -  February 3rd, 2008 at 7:04 am  -  #12

Hey jason,
Are you talking about http://finance.jasoncrews.name/ ? If so, i see that GotBanners is working well on that site.
By the way, i suggest that you try Rotatee.com : http://gotchance.com/2008/02/01/rotateecom-launches/

Robert Irizarry  -  March 10th, 2008 at 10:15 pm  -  #13

Happy to say that GotBanners is working very well with my site’s new theme. And I’ve seen no issues running under the 2.3.x.

Samsul  -  March 23rd, 2008 at 5:13 am  -  #14

many thanks for the plugin.
btw, i like your bubble comment style :-)

Hari  -  March 23rd, 2008 at 11:32 am  -  #15

oh ! thanks,

Paul  -  April 4th, 2008 at 9:59 am  -  #16

I like the way gotbanners work, but i would like to only show two banners and to rotate them. I got about 12 banners in total, but would like to show only 2 at a time. Is there any chance to do so? I realize Rotatee does just that, but since its in private beta, can’t really access it.

Hari  -  April 4th, 2008 at 3:31 pm  -  #17

You can use the “gotchance” invite code to sign up !

ASP  -  April 19th, 2008 at 4:31 pm  -  #18

Useful…

Thanks!

gofree  -  May 9th, 2008 at 10:49 am  -  #19

great plugin, so why not also install an option to make 2 or even more ads possible?

akash  -  June 10th, 2008 at 6:46 am  -  #20

hi cool plugin workin fine with wp 2.5.1

thanks for the plugin

peter  -  August 26th, 2008 at 10:40 pm  -  #21

friend I want to put the module on the opposite side where I have my menu I hope we can help contact my website is gamesenred.com.

ENT Doctor  -  March 22nd, 2009 at 11:56 am  -  #22

Having 2 columns is really great.

RFP, RFQ, RFI  -  March 31st, 2009 at 10:08 am  -  #23

Happy to say that GotBanners is working very well with my site’s new theme. love your Blog

copyright © gotchance.com   ~   theme by me   ~   urchin tracks my blog   ~   php, mysql   ~   monetized by adsense   ~   feedburner burns my feed.   ~   contact me via kontactr
akismet catches spam for me   ~   proudly powered by wordpress   ~   rotatee rotates my ads   ~   i share this   ~   using firefox 3   ~   gmail fan   ~   i use google reader
proud indian   ~   nokia 5310 xpressmusic   ~   foobar2000   ~   i tweet   ~   i support open source   ~   get ubuntu   ~   these links are nofollow   ~   code is poetry   ~   0.415 seconds