Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Resize Boxes!


Hugo RSF

Recommended Posts

Posted

Hi people!

 

I need to now how to enlarge de left menu boxes.

 

I only want to enlarge (width) the Categories box, but i presume the layout will be very odd if only Categories box in the left side be enlarged and all other boxes mantain the original size, so i presume that'll be better to enlarge all the boxes on the left.

 

 

Any help?

 

Thanks in advance!

Posted

Hi,

 

Basically, yes, you will have to change the width of all 'boxes' within the left hand column. Do a view/source and find these lines

 

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<!-- categories //-->

 

It is the 'width="125" you will need to change, but of course making it wider will affect other columns.

 

Line 59 in /includes/application_top.php is where the width is defined:

 

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

 

but unfortunately, that is for left and right navigation 'column width'.

 

You could add another define in application_top.php like ...

 

// customization for the design layout - left column only
 define('BOX_WIDTH_LEFT', 145); // how wide the boxes should be in pixels (default: 145)

 

but then you would need to change every file in /catalog that uses this, about 38 approximately.

 

I'm sure there is an easier solution, like using one of the template contributions, BTS or STS are well known and well used.

 

Peter

Posted
// customization for the design layout - left column only

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

Actually Peter, if that works and it's in application_top then it should not have to be written anywhere else, as it will automatically apply to every page.

 

Vger

Posted

Thanks to both!

 

I edited the line:

 

define('BOX_WIDTH', 125);

 

and incrised it to 130. Ok, rigth info boxes resize as well but i can deal with it.

 

Thanks a lot!

Posted
Thanks to both!

 

I edited the line:

and incrised it to 130. Ok, rigth info boxes resize as well but i can deal with it.

 

Thanks a lot!

 

A trick which helps to size only one side without changing the box_width variable is to edit your catalog/includes/languages/english.php (or whatever languages involved) and change the box heading text a little bit.

Something like this:

define('BOX_HEADING_CATEGORIES', '    Article categories    ');

I noticed the whole column sizes upon de longest string used in one of the box headings. What you can do is put some   around ie. the category box header text and you will have a wider box without influencing the other side. It is also ideal if you have different languages and for one of the languages the box is a little bit too small. You edit just that language.php and it doesn't interfere with the boxes width for the other languages.

Posted

Hi,

 

Actually Peter, if that works and it's in application_top then it should not have to be written anywhere else, as it will automatically apply to every page.

 

Yep, totally true, but I assumed the poster wanted the left (width) different to the right column width, so we would need 2 defines, and the constant BOX_WIDTH that now refers to the left hand column in all the 38 files would have to be changed to BOX_WIDTH_LEFT.

 

But I don't know if the poster wants the right to remain the (new) size ? It would have been nice if this was built in, to give people more flexibility, simply one more constant in application_top.php (or better still, change it via admin - configuration table).

 

Anyway, I see 'wheeloftime' has given a much easier solution than I supplied , that will work, or increasing the width of an image within the same table will push it wider.

 

When site 'sizes' are being increased, sometimes people forget that not everyone has a 17" or 20" monitor, or more the point, 800x600 is ideal, which is the 'standard' resolution. Nothing more frustrating than having to use the scroll bars on sites, especially the horizontal one. :D

 

Peter

Posted
When site 'sizes' are being increased, sometimes people forget that not everyone has a 17" or 20" monitor, or more the point, 800x600 is ideal, which is the 'standard' resolution. Nothing more frustrating than having to use the scroll bars on sites, especially the horizontal one.

 

Fixed Width Site with CSS - below my name - set for 800 width.

 

Vger

Posted

p.s. Works in IE, Safari, Mozilla, Firefox, and Opera (not sure about old Netscape)

 

Vger

Posted

Hi,

 

Fixed Width Site with CSS - below my name - set for 800 width.

 

Thanks, I must check that out, I do like the look of CSS and starting teaching myself a while back, but other things get in the way. There was a 'ZenGarden' site and some other really good ones.

 

Does the contrib. have all the usual CSS hacks in it, to handle different browsers, especially the IE 'quirks'.

 

Peter

Archived

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

×
×
  • Create New...