View Full Version : Banner Help for oscommerce
kootchiekooz
10-27-06, 01:42 PM
Hi there, I haven't posted year for a year lol. I was wondering if anyone knows how to get the banners side by side opposed to the coloumn style? I asked in the oscommerce forum and no answers as of yet. Reason being is my home page looks too long and putting the banners side by side will shorten it up :D I know the code for the banner and how to do the lt, rt center, but need side by side.
TIA!!
Smiles,
Rhonda
I'm not sure what you mean by "banners" in this context. Usually I think of banner ads.
What's your store URL? Maybe that will help me understand.
kootchiekooz
10-27-06, 11:57 PM
Sorry, lol It is for ad banners here is my site www.kootchiekooz.com As you notice at the bottom, the ad banners are straight in a row. I don't know how to get them side by side. Thanks!
Smiles,
Rhonda
Oh, I get it. You have those ad images in includes/column_left.php, so they are in the left column. Move them instead to includes/footer.php in a new table row.
kootchiekooz
10-31-06, 02:27 AM
That is where I have them now is in the footer. Here is my code I use. I know I can change the td align to left, right center but need side by side. Should the code be changed? Even when I do them rt, center they always end up below each other if that makes sense lol. Thanks Steve!!
<?php
if ($banner = tep_banner_exists('dynamic', '140x46')) {
?>
<br>
<table border="0"width="100%" cellspacing="0" cellpadding="1">
<tr>
<td align="Left"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>
Ah, I see. What you have is each banner in its own table row with align set to left. That will produce the result you see. What you want instead is one row with either multiple columns (<td>) or just put one banner reference next to another in the same row. (Using separate columns allows you to space them out evenly.)
kootchiekooz
11-1-06, 02:23 AM
So how would I write this out? I'm not good with all of this coding as you can see haha Here are 2 examples of my banner ads below. So do I leave out the align part and leave it just to <td> ?? Blend the two tables together somehow ??Sorry i'm a little confused Thanks!
Rhonda
<?php
if ($banner = tep_banner_exists('dynamic', '140x46')) {
?>
<br>
<table border="0"width="100%" cellspacing="0" cellpadding="1">
<tr>
<td align="Left"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>
<?php
if ($banner = tep_banner_exists('dynamic', '130x40')) {
?>
<br>
<table border="0"width="100%" cellspacing="0" cellpadding="1">
<tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>
Try this:
<?php
if ($banner = tep_banner_exists('dynamic', '130x40')) {
?>
<table border="0"width="100%" cellspacing="0" cellpadding="1">
<tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>
I think this will give you three banners across. Remove the other sections that display banners.
kootchiekooz
11-2-06, 02:49 AM
Okay, I did this, it came out 3 across but it gives me 3 banners of the same as its under one dynamic. What do you mean by removing other sections that display the banners?? I'm learning, slloowwwlly hehe
Thanks a bunch!!!
Sorry about that. I don't use this feature of osC so I didn't fully understand the code. Try
<table border="0"width="100%" cellspacing="0" cellpadding="1">
<tr>
<td align="center"><?php if ($banner = tep_banner_exists('dynamic', '130x40')) echo tep_display_banner('static', $banner); ?></td>
<td align="center"><?php if ($banner = tep_banner_exists('dynamic', '130x40')) echo tep_display_banner('static', $banner); ?></td>
<td align="center"><?php if ($banner = tep_banner_exists('dynamic', '130x40')) echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
Note that the PHP code at the start and end has been removed.
kootchiekooz
11-2-06, 08:21 PM
YAAAYYYYY THANKYOU STEVE!!! It worked !!!! VERY much appreciated. :)
Smiles,
Rhonda
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.