Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to reduce width of pixel_trans.gif in column_left??


Rob Petterson

Recommended Posts

Can you have a quick look at my site

http://www.e-commercedesign.co.uk/catalog/default.php

 

You'll notice that the main 3 images in the center are well - not centered!

If you left click your mouse and drag over the page, you can see for example that between the 'collections' heading and the drop down list there is a pixel_trans.gif (there seems to be 8 of these plus another smaller one to the right of the 'shop for...' image). I'd like to be able to reduce the width of these by about 1cm.

 

I don't have any problem changing the width on the other images here, but for the last 2 hours now I haven?t managed to locate where this bit of code lives.

 

Any help on this would be greatly appreciated.

 

 

Cheers, Rob

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

One thing that has always helped me with layout is in the Table tags...

 

Add border="1" to any of your tables to add a border (temporarily) to your table and that will help you to see where everything is layed out within the table. Once you have your items layed out the way you want it, go back in change teh table tag back to border="0" and the borders will disappear.

 

Hope this helps!

 

Have a great day!

 

-R

Link to comment
Share on other sites

OK,

I've looked in default.php and have found 3 different points in the code where a reference is made to pixel_trans.gif

The width is set to 100%. I have tried to change this to a reduced value, but does not have any effect on the width of the pixel_trans.gif in my column_left.php

Can anyone give me an answer to this little problem?

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

Setting pixel_trans to 100% basically is telling it to size the width (or height) to whatever the width or height size of the Table or cell that it is placed in.

 

Did you try my earlier suggestion? That will tell you EXACTLY where everything is layed out. Once you know that, you can deal with your issue a bit easier.

 

Good Luck.

 

-R

Link to comment
Share on other sites

Thanks for your reply Randy.

I do understand how table borders work but can't see how that will help me find which file I need to edit the pixel_trans.gif in. The cloumn_left.php file is where this graphic is being displayed and is somehow calling another file which holds this information on the graphics width.

I have already tried to reduce the width of the box variable in application_top.php. But it can't be reduced anymore than I have due to the fact that I can't reduce the pixel_trans in whatever file it lives in.

 

I just need the name of the file to edit. I can take it from there.

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

okay... I see what you are talking about now!

 

Can you post the contents of your column_left.php file? Thats a good place to start.

 

-R

Link to comment
Share on other sites

I've put borders around all boxes,tables etc in default.php

 

Here's the code you asked for:

 

 

<?php

/*

 $Id: column_left.php,v 1.14 2003/02/10 22:30:50 hpdl Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2003 osCommerce



 Released under the GNU General Public License

*/

?>

<br>

<IMG SRC="images/boxes/logo.gif" WIDTH=130 HEIGHT=75>

<?php

 if ( (USE_CACHE == 'true') && !defined('SID')) {

   echo tep_cache_categories_box();

 } else {

   include(DIR_WS_BOXES . 'categories_dhtml.php');



 }



 if ( (USE_CACHE == 'true') && !defined('SID')) {

   echo tep_cache_manufacturers_box();

 } else {

   include(DIR_WS_BOXES . 'manufacturers.php');

 }

 /* put wish list contrib here */

 //require(DIR_WS_BOXES . 'whats_new.php');

 require(DIR_WS_BOXES . 'search.php');

      // include(DIR_WS_BOXES . 'add_favourites.php'); 

//added for wishlist

require(DIR_WS_BOXES . 'information.php');



 





 

 

?>

[/url]

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

okay... I don't see anything in there... so it must be something in each of the infoBox files. I say this because in your column_left.php, the first thing you call is logo.gif and I don't see a pixel_trans underneath that, but there is a pixel_trans under each of the infoBoxes.

 

Can you post the code to one of your infoBoxes, like information.php?

 

Thanks.

 

-R

Link to comment
Share on other sites

I already looked at a couple of files in catalog/includes/boxes, but couldn't see any reference made to pixel_trans.

Anyway, Here's the code you requested:

 

<?php

/*

 $Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2001 osCommerce



 Released under the GNU General Public License

*/

?>

<!-- information //-->

<tr>

<td>

<br>

<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>



<TR>

<td>

<?php

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

                                         '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'

                             );

 new infoBox($info_box_contents);

?>

</TD>

</TR>

<TR>

 <TD COLSPAN=3>

	 <IMG SRC="images/boxes/trans_label_footer.gif" WIDTH=173 HEIGHT=20></TD>

</TR>

</TABLE>

</td>

</tr>

<!-- information_eof //-->

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

Try removing this piece of code at the bottom of the file...

   <TR> 

     <TD COLSPAN=3> 

        <IMG SRC="images/boxes/trans_label_footer.gif" WIDTH=173 HEIGHT=20></TD> 

  </TR>

If this code appears in all of your infoBoxes, than I think that is the issue.

 

Let me know.

 

-R

Link to comment
Share on other sites

I put that piece of code in there. It just puts a spacer in between the boxes. It has nothing to do with pixel_trans variable.

 

pixel_trans.gif has to be listed in some other file....

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

The only other place it could be is in the catalog/includes/classes/boxes.php file, which actually creates each of the boxes. I can't think of anywhere else that it might be called from.

 

Open the boxes.php file and search for pixel_trans.gif and see what you come up with. Make sure to backup the file before you make any changes... just in case.

 

-R

Link to comment
Share on other sites

I added this bit of my code myself - all it does is put a spacer between the various boxes. It's got nothing to do with pixel_trans.gif.

 

I've already reduced the width on this image in all the boxes yesterday, but the pixel_image.giff remains the same width. (if you left click and drag the mose over the column_left you'll see that pixel_trans is the line which is 1 pixel in height and stretches from the LHS of column_left to thr RHS (there's 8 if them showing).

Sometimes I think I understand everything, then I regain consciousness

Link to comment
Share on other sites

LOL... I know... did you search the boxes.php file for pixel_trans.gif like I suggested in my previous post? Thats the only other place it could be.

 

-R

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...