Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Little help with design?


jhicks

Recommended Posts

So. Today i decided i wanted to add an table to my front page. catalog/includes/languages/english/index.php

 

Well, my html is a little rusty so i made a mistake and the spacing of some things got messed up. And now i have no idea where. So hopefully someone here can help me out.

 

This picture is what the spacing looked like before i tried to add the table.

(Notice the spacing between stuff in the center and the boxes on right.)

zufbl4.gif

 

 

This picture is what the table looks like, but where the spacing is messed up.

kcayjr.gif

 

 

Here is my old code:

<?php
/*
 $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_MAIN', '<p align="center"><strong>We strive to bring you the most competitive prices in the  Roanoke Valley!<br />
 With monthly Discount Specials, and random coupon savings.</strong></p>
<p align="center"><strong>We specialize in trees that are larger than what most  nurseries in the area sell. While offering extremely high quality trees,  shrubbery and other type plants.</strong></p>
<p align="center"><strong>We can supply you with almost any species of tree or shrubbery  quickly. Our trees and shrubbery are always fresh dug and delivered to us  weekly.</strong></p>
<p align="center"><strong>Unlike most retail nurseries, We do not order any cull or poorly  grown trees. Each tree that we sell is inspected by one of our Certified  Arborist for quality.</strong></p>
<p align="center"><strong>We do not charge any extra fee to ship your plants from our  growers to our nursery. We can load your truck or trailer FREE or we can  deliver the product to your location for a small fee.</strong></p>
<p align="center"><strong>You can order your trees from our nursery with confidence,  knowing that you will receive only the best quality around.</strong></p>
<p align="center"><strong>We Accept Visa and  MasterCard (Online and on-site)<br />
 Check, Money Order Or Cash (On-site)</strong></p>');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', 'Product List');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'Welcome To Mineral Springs Nursery!');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
?>

 

Here is my new code:

<?php
/*
 $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_MAIN', '		              <table border="0" width="100%" cellspacing="0" cellpadding="0">
  <!--       ke delete many contents here                  11-9----------------------------------------------------->
     <tr>
       <td><img src="images/pixel_trans.gif" width="100%" height="2" border="0" alt=""></td>
     </tr>

                                   <tr>
	  <!-- /* new products shows here. ke */ --> 
          <tr>
	  <!-- /* new products shows here. ke */ --> 
         <td style="padding:10px; text-align:justify; font-family:Arial, Helvetica, sans-serif; font-size:12px; border:solid; border-width:1px; border-color:#cccccc; color:#000000" width="98%">
	  <table>
         <tr>
         <td>
	  <div style="font:Arial, Helvetica, sans-serif; font-size:12px; color:#000000; width:98%; font-weight:bold;">
         		    <p align="left">We strive to bring you the most competitive prices in the  Roanoke Valley! With monthly Discount Specials, and random coupon savings.</p>
	    <p align="left">We specialize in trees that are larger than  what most nurseries in the area sell. While offering extremely high  quality trees, shrubbery and other type plants.</p>
	    <p align="left">We can supply you with almost any species of  tree or shrubbery quickly. Our trees and shrubbery are always fresh dug  and delivered to us weekly.</p>
	    <p align="left">Unlike most retail nurseries, We do not order  any cull or poorly grown trees. Each tree that we sell is inspected by  one of our Certified Arborist for quality.</p>
           </div>

 </td>
         <td>
         <img src="images/office.jpg" width="300" height="225" border="0" alt="Our office" title="Our office">          </td>
         </tr>

         </table>
         </td>
         </tr>

          <tr>
       <td><img src="images/pixel_trans.gif" width="100%" height="8" border="0" alt=""></td>
          </tr>


</p>');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products');
define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Featured Products in %s');


if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', 'Product List');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'Welcome To Mineral Springs Nursery!');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
?>

 

 

Any idea's where i might have went wrong? Thanks for help in advance all.

Link to comment
Share on other sites

First, some of this depends on where you inserted your code. Where in the table structure it all fits. Assuming you have not changed anything, your defined text needs to follow a simple structure...

 

table

table row

table data

end table data

end table row

end table

 

 

It does not do this.

 

First, you need to get any comments inside table data tags. Even a comment outside of the data tags will throw things off. Then, you have an extra table row tag, it does not end with an end table row, or end table, and you have a paragraph that now thinks it is in the table when I think it probably should not be...

 

Does that give you some place to start looking?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

I took what you were saying and tried to put the table and border i was using inside another table, but this still gave me the same result. Even though everything was kept inside a table tag " <table> </table>

 

Code i tried:

<?php
/*
 $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_MAIN', '		              <table width="100%" border="0">
 <tr>
   <td>        <table border="0" width="100%" cellspacing="0" cellpadding="0">
  <!--       ke delete many contents here                  11-9----------------------------------------------------->
     <tr>
       <td><img src="images/pixel_trans.gif" width="100%" height="2" border="0" alt=""></td>
     </tr>

                                   <tr>
	  <!-- /* new products shows here. ke */ --> 
          <tr>
	  <!-- /* new products shows here. ke */ --> 
         <td style="padding:10px; text-align:justify; font-family:Arial, Helvetica, sans-serif; font-size:12px; border:solid; border-width:1px; border-color:#cccccc; color:#000000" width="98%">
	  <table>
         <tr>
         <td>
	  <div style="font:Arial, Helvetica, sans-serif; font-size:12px; color:#000000; width:98%; font-weight:bold;">
         		    <p align="left">We strive to bring you the most competitive prices in the  Roanoke Valley! With monthly Discount Specials, and random coupon savings.</p>
	    <p align="left">We specialize in trees that are larger than  what most nurseries in the area sell. While offering extremely high  quality trees, shrubbery and other type plants.</p>
	    <p align="left">We can supply you with almost any species of  tree or shrubbery quickly. Our trees and shrubbery are always fresh dug  and delivered to us weekly.</p>
	    <p align="left">Unlike most retail nurseries, We do not order  any cull or poorly grown trees. Each tree that we sell is inspected by  one of our Certified Arborist for quality.</p>
           </div>

 </td>
         <td>
         <img src="images/office.jpg" width="300" height="225" border="0" alt="Our office" title="Our office">          </td>
         </tr>

         </table>
         </td>
         </tr>

          <tr>
       <td><img src="images/pixel_trans.gif" width="100%" height="8" border="0" alt=""></td>
          </tr></td>
 </tr>
</table>



</p>');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products');
define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Featured Products in %s');


if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', 'Product List');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'Welcome To Mineral Springs Nursery!');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
?>

 

Any other idea's?

Link to comment
Share on other sites

Try this code in your define statement. Please make a backup in case it is no where near what you wanted.

 

<table width="100%" border="1">
<tr>
<td>
<table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/pixel_trans.gif" width="100%" height="2" border="0" alt=""></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:10px; text-align:justify; font-family:Arial, Helvetica, sans-serif; font-size:12px; border:solid; border-width:1px; border-color:#cccccc; color:#000000" width="98%">
<table width="100%" border="1">
<tr>
<td>
<div style="font:Arial, Helvetica, sans-serif; font-size:12px; color:#000000; width:98%; font-weight:bold;">
<p align="left">We strive to bring you the most competitive prices in the  Roanoke Valley! With monthly Discount Specials, and random coupon savings.</p>
<p align="left">We specialize in trees that are larger than  what most nurseries in the area sell. While offering extremely high  quality trees, shrubbery and other type plants.</p>
<p align="left">We can supply you with almost any species of  tree or shrubbery quickly. Our trees and shrubbery are always fresh dug  and delivered to us weekly.</p>
<p align="left">Unlike most retail nurseries, We do not order  any cull or poorly grown trees. Each tree that we sell is inspected by  one of our Certified Arborist for quality.</p>
</div>
</td>
<td>
<img src="images/office.jpg" width="300" height="225" border="0" alt="Our office" title="Our office">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img src="images/pixel_trans.gif" width="100%" height="8" border="0" alt="">
</td>
</tr>
</table>
</p>

 

Oh, you will have to set the borders to what you want...

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...