Specials / Columnar display
Does anyone know where in Zen Cart code the <br /> between rows of specials gets written?
I can see where it is writing the actual content of the seperate divs for each special but can;t figure out where the break gets scripted to split the, in my case, 3 column rows from each other.
You can see the issue I'm trying to reslove here: zen.napiers.net - the special offers list at the bottom of the page. When the specials titles and images are of differing heights some unexpected layout issues occur caused by the float:left of the divs. I need to change the <br /> between the rows to <br style="clear:both;" />
Any pointers appreciated
thanks
Re: Specials / Columnar display
Instead of adding the <br />, another approach by css.
Add the following to your stylesheet.
Quote:
.categoryListBoxContents {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
And set the values you perfer.
And the above only for template based on the classic template design.
.
Re: Specials / Columnar display
Thanks for the reply. Adding margins to the individual specials in the columns and rows won't help I'm afraid. I need to have a divider between the rows which clears the floats of the above row.
It would be easy if I could just find which file the Zen code uses to place the <br /> between the rows.
thanks anyway
Re: Specials / Columnar display
Please make sure to use the OverRide for the modification! :smile:
The file are.
includes/templates/YOUR_TEMPLATE/templates/tpl_specials_default.php
In line 22 and 40:
<br class="clearBoth" />
.
Re: Specials / Columnar display
I don't think that's the right file. Those page breaks are for separating the prev/next links at the top and bottom of the page from the main body of the specials listing.
The <br /> code I am after gets used when Zen Cart is setting up the columnar display.
Example - say you have 9 specials and have set up in the admin to display them in rows of 3. Zen Cart inserts a <br /> between each of the 3 resulting rows. I need to figure out which file inserts those <br />'s
<div width="33%">special 1</div><div width="33%">special 2</div><div width="33%">special 3</div>
<br />
<div width="33%">special 4</div><div width="33%">special 5</div><div width="33%">special 6</div>
<br />
<div width="33%">special 7</div><div width="33%">special 8</div><div width="33%">special 9</div>
Re: Specials / Columnar display
Oops!
Sorry, the above info. is not correct! :blush:
Please check the file:
includes/templates/YOUR_TEMPLATEt/common/tpl_columnar_display.php
Line 40
<br class="clearBoth" />
Please note, this will also affect all pages using the columnar for display.
.
Re: Specials / Columnar display
That's it! Thanks very much. I'd removed the <br class="clearBoth" /> from my code there a few weeks ago and what has caused the confusion is that Zen Cart continues to place a <br /> there even after I removed the code.
Anyways thanks a lot for your time on this :-)