The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu May 15, 2008 3:41 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Feb 11, 2008 6:45 pm
Posts: 7
I am using the banner component and when two or more banners show, they stack on top of each other with no space between them and they also have a blue border around them. How do I space these and what files do I need to edit. I really need some help with this. Thanks.


Top
 Profile  
 
PostPosted: Thu Jan 08, 2009 9:57 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 07, 2008 12:45 pm
Posts: 15
i have the same problem, any hints?


Top
 Profile  
 
PostPosted: Thu Jan 15, 2009 5:42 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 6:55 am
Posts: 11
Same problem, any ideas? I could add a faux separation on my graphic, but that doesn't help because I have a border on linked images. There must be a more reasonable way to space out these images. CSS?

EDIT: My very unsophisticated solution has been to add a img reference in the template CSS like below:

a img{
padding-bottom: 5px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}

It eliminates the border and adds the space, but of course the change is global so it will impact linked images other than the banners.


Top
 Profile  
 
PostPosted: Fri May 29, 2009 10:45 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri May 29, 2009 6:21 pm
Posts: 3
This is how I did it:

open modules/mod_banners/helper.php

Find this code:


Code:
else if (BannerHelper::isImage( $item->imageurl ))
      {
         $image    = '<img src="'.$baseurl.'images/banners/'.$item->imageurl.'" alt="'.JText::_('Banner').'" />';


add "vspace="10px" (or any value you like) after the img tag se the code looks like this:

Code:
else if (BannerHelper::isImage( $item->imageurl ))
      {
         $image    = '<img vspace="10px" src="'.$baseurl.'images/banners/'.$item->imageurl.'" alt="'.JText::_('Banner').'" />';


As for the border, well, I haven't tested it but i'm sure you can add the border="0" attribute to the image tag as well.

Cheers



EDIT: while the previous mod works well on firefox, it doesn't work on IE7, so an easier way to add a vertical space between banners is to add a <br /> tag after the image tag like this:

Code:
else if (BannerHelper::isImage( $item->imageurl ))
      {
         $image    = '<img src="'.$baseurl.'images/banners/'.$item->imageurl.'" alt="'.JText::_('Banner').'" /><br />';

_________________
[url=http://redmezzanine.[URL banned].com]the red mezzanine[/url]


Top
 Profile  
 
PostPosted: Wed Jun 10, 2009 2:11 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Tue Apr 15, 2008 5:18 pm
Posts: 275
Location: Los Angeles, CA
Add the following (if not there) to your template's css file:

.banneritem img
{
display: block;
border:none;
margin-left: auto;
margin-right: auto;
margin-bottom:10px;
}


Top
 Profile  
 
PostPosted: Sat Jul 03, 2010 4:33 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jan 18, 2008 4:20 pm
Posts: 14
red2678 wrote:
Add the following (if not there) to your template's css file:

.banneritem img
{
display: block;
border:none;
margin-left: auto;
margin-right: auto;
margin-bottom:10px;
}


THANK YOU!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 



Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group