Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Column Widths


philuk2002

Recommended Posts

Hi,

 

I'm trying to change the widths of the 3 main columns of my site, you've got the left column with things like the Categories, then the main columns where all the products show, then the right column with things like 'Best Sellers' Box, i want to make the Middle column wider with the right and left smaller.

 

Which file contains this information?

 

Thanks In Advance.

Link to comment
Share on other sites

The widths of the columns are defined by BOX_WIDTH which by default is set to 125.

 

This is actually the most common setting for what the boxes need to fit when using both columns.

 

You can change this setting to smaller or larger, but it effects both columns equally.

 

I did add a contribution for Column Controller that aside from defining what goes in which column, it also defines if a column is on or off and shows you how to set up the columns to have independent widths.

 

Otherwise, look for BOX_WIDTH in /includes/application_top.php

 

define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)

Link to comment
Share on other sites

Thanks for that, i've now done this, but i got all the widths wrong, so i used the backup application_top.php file i made before and put it back in but the widths are still really small even though its the original application_top.php file, this is really weird, do you know what could be causing this?

 

Thanks

Link to comment
Share on other sites

There is one definition for the BOX_WIDTH located in /includes/application_top.php

 

Unless you are editing them by hand ...

 

If you are editing them by hand, understand that the top section that refers to the BOX_WIDTH in each file is column_left and the bottom section that refers to BOX_WIDTH is column_right.

 

There are two (2) occurances for the LEFT and RIGHT columns right next to each other.

 

Example:

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

 

That means start the left column <td> then add the middle <table> then end the left column <td>

 

That does not mean LEFT MIDDLE RIGHT :shock:

Link to comment
Share on other sites

Let me try that again as I said it so poorly ...

 

The first <td> is the width of the left column's <td> then a <table> definition is defined within that <td> for the same width ... next comes the left column itself.

 

Then the middle stuff is defined

 

Then the right column is defined as the last stuff in a file similar to the left column:

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

Now did that totally confuse you or what? :D

Link to comment
Share on other sites

  • 5 years later...

It's very easy to alter column widths, by accessing your FILE MANAGER through your Admin Page, then, click on the "includes" folder, then click on the little "i" in a circleto the far left of the application_top.php link. This will made a small box near the top of the screen with an "edit" button.

 

Click on this button, and you will bring up a manual code entry box. Scroll down a little until you see the following:

//customization for the design layout

define('BOX_WIDTH',125);

 

You can change this to whatever number you want. If the width of your categories box is to narrow, increase this number. Hope this helps.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...