You are here:  » Question about editing html/searchresults.php


Question about editing html/searchresults.php

Submitted by 2fer on Mon, 2014-06-09 20:30 in

Hi David,
During some editing, I had an idea but need to check here.
In the file: html/searchresults.php where it has:

      <td width='<?php print intval(100/$columns); ?>%'> <!-- RESULT -->
        <table class='each'>

I want to change this to:

      <td class='<?php print intval(100/$columns); ?>'> <!-- RESULT -->
        <table class='each'>

(changed width to 'class' and removed % after the $columns/100 calc -The reason is to add td.33, td.50 and td.100 to the css and have it validate in html5.)
I'm trying to do some quickfix converting to more responsive design coding which is OK with tables, but not OK with "width=" on the page.
My questions:
Are other widths ever produced assuming my shops use 3 columns?
Will this mess up something somewhere else?
Thank you so much!
2fer

Submitted by support on Tue, 2014-06-10 10:12

Hi 2fer,

I'm sure you're aware but just in case you weren't I recently published a brand new Responsive HTML template for Price Tapestry (compatible with 13/03A) but I know you've been using the script for many years and have no doubt considerably modified the original template (using for example the original "grid view" version as you are in this case) so a conversion is most likely the easier approach.

To that end, instead of using the result of the calculation, if you know you are always going to have 3 columns then I would use a fixed class instead; e.g.

      <td class='3-col'> <!-- RESULT -->
        <table class='each'>

And then define a style for .3-col as required e.g. width:33%; There aren't any other width definitions to consider at all.

Cheers,
David.
--
PriceTapestry.com

Submitted by 2fer on Wed, 2014-06-11 18:33

Hi David,
I had not heard anything about this new development, I downloaded it last night (both as the full zip and the html zip) to take a look. I am far less advanced in my progress than a calendar might indicate. Thanks to local construction problems, I was essentially offline since just after the new year. So I am back to working on the first few setups I started last fall. In the shops where I have worked on more responsive design I have seen better progress which is why I am so interested it the topic. I certainly appreciate the new development and other additional tools I'm seeing. I have lots to catch up on. Thanks again!
2fer