Forums / Templates, Stylesheets, Page Layout / Strange Margin/Gap Help Get Rid of Please

Strange Margin/Gap Help Get Rid of Please

Locked

Views: 968

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
21 Feb 2009, 11:55 AM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Strange Margin/Gap Help Get Rid of Please

Hi All....

I wonder, can anyone tell from the source code what is causing the large gap between the "Lingerie" heading and the box contents here:

21 Feb 2009, 12:01 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Strange Margin/Gap Help Get Rid of Please

there is large space between <p></p> tag in your side box . this might be set into your sidebox module that you have installed for Lingerie, open that module in text editor and remove extra spaces ..

21 Feb 2009, 1:36 PM
#3
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Strange Margin/Gap Help Get Rid of Please

Hi Tony,

Thanks for the reply. I opened all three files that control the additional sidebox but none of them seem to have a <p></p> tag.

Maybe you can see something that I can't?

FILE 1:

<?php
/**
 * blank sidebox - allows a blank sidebox to be added to your site
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
 */

  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

  // Replace the text and HTML tags between the apostophes on lines 19 and 20.
  // Use as many or as few lines using this model as you need for your custom content.
  // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
  // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)
  $content .= '<p>' . TEXT_JACKET_SIZES_SIDEBOX . '</p>';
?>

FILE 2:

<?php
/**
 * blank sidebox - allows a blank sidebox to be added to your site
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
 */

  // test if box should display
  $show_jacket_sizes_sidebox = true;
  
  if ($current_category_id == 23 or $current_category_id == 97 or $current_category_id == 98 or $current_category_id == 99 or $current_category_id == 100 or $current_category_id == 101 or $current_category_id == 102 or $current_category_id == 103 or $current_category_id == 104 or $current_category_id == 105 or $current_category_id == 106 or $current_category_id == 107 ) {
      require($template->get_template_dir('tpl_jacket_sizes_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_jacket_sizes_sidebox.php');
      $title =  BOX_HEADING_JACKET_SIZES_SIDEBOX;
      $title_link = false;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
 }
 

 
?>

FILE 3:

<?php
/**
 * blank sidebox definitions - text for inclusion in a new blank sidebox
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
 */

define('BOX_HEADING_JACKET_SIZES_SIDEBOX', 'Jackets');
define('TEXT_JACKET_SIZES_SIDEBOX', 'my HTML is in here');

?>

Maybe it's something simple? I'm a complete amateur but learning every day thanks to the help of people on this forum like yourself :-)

21 Feb 2009, 2:03 PM
#4
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Strange Margin/Gap Help Get Rid of Please

I couldn't find what was causing the gap here but I managed a workaround using a <div style="position:relative; top:-25px"> tag.... This has been a very useful tag in my experience so far with Zen Cart as it's allowed me to fine tune the positions of various troublesome items including the position of my add to cart box!

21 Feb 2009, 2:30 PM
#5
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Strange Margin/Gap Help Get Rid of Please

Found a better solution thanks to PM from tony above....

FILE 1: Replace:

$content .= '<p>' . TEXT_JACKET_SIZES_SIDEBOX . '</p>';

with:

$content .= '<h1>' . TEXT_JACKET_SIZES_SIDEBOX . '</h1>';

Thanks Tony, I owe ya one! Worked a treat...