Jump to content
Latest News: (loading..)
Sign in to follow this  
XxWickedxX

How to expand or restrict template width?

Recommended Posts

I have osCommerce Online Merchant v2.2 RC2a with a custom template and numerous modifications. I know that alone deters anyone from offering advise on trouble shooting but all I am really looking for just a point in the right direction. I template does not take up the entire screen space. It is one one of those templates with a lot of white space on the left and right side of the template. My best and only real thought was to go straight to the stylesheet.css. I can not find what I am looking for though. I thought I would find some things that would be matter of changing pixel sizes or width percentages. Anyone have a shove in the right direction?

Edited by XxWickedxX

Share this post


Link to post
Share on other sites

This was an excellent resource. However [catalog]/includes/template_top.php does not even exist in my file structure. I suppose the custom template for the shop eliminated this method or my version did not include this file structure.

Share this post


Link to post
Share on other sites

You are right, because what I wrote on my blog is for version 2.3.1 and you have rc2a

 

Rc2a had by default not a fixed width, but you also say you use a template. So, it could be that the width is fixed in the stylesheet, but even more possible that the tables have a fixed width on each page.

 

Take a look first of all at your source code and/or use firebug to figure things out. You can post/pm your domain if you want

Share this post


Link to post
Share on other sites

domain pm'ed. There is one way I can expand the template that you will see which I have already expanded once already but the method may have less than desirable results once its fully expanded. I can make the product images on my home page bigger through the admin panel and then my template will automatically grow with the extra content size. Then all I have to do is fix all the graphics the "break" in the template and re-size them for the new width.

Share this post


Link to post
Share on other sites

No, that way that you say is wrong, you place 2 different rules to fight to each other: eg width 80px and image inside 900px. That's wrong

 

Got your domain, and what I see is a huge amount of tables and inline styles. However, at your source code, I see following:

<!-- header //-->
<!-- start -->
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:766px; margin:auto;">

This 766 pixels are setting the width of your store, change this number to anything you want.

 

Where to find this? I guess it is in file includes/header.php. If you are lucky, it's there. If not, then you need to open each top level file (eg index.php, contact_us.php etc) and find it/change it there.

 

This may have some other implications, for example to the top menu background that has also a fixed width, I don't know where else

Share this post


Link to post
Share on other sites

Thanks.. I will find this in the style sheet hopefully versus top level files.. I will see what kind of issues I run into.. The navigation bar you were speaking of will require redoing a little .psd file so we will see how it goes when I open this project up in the next day or so.

Share this post


Link to post
Share on other sites

I didn't said to do anything in the stylesheet, you will not find anything there for the width.

 

As for all the trouble making a background image in photoshop just to have a plain color, I don't know. Do it with css

Share this post


Link to post
Share on other sites

I have 2.2 and am having the same problem.

When I go in and change the width from 766 to 1000, the store widens but then I get the top left block of color repeated over toward the right corner, and a vertical line of color down the page? Not sure what to do to fix these errors. Can anyone help?

Share this post


Link to post
Share on other sites

@@pjsmith82

 

It is not very clear what is happening, would be better you post your url

 

Beside that, version 2.2 is quite old now, you'll run into more serious problems than the store width very soon, the best advice I can give is, to upgrade to the latest osCommerce version or the alternative bootstrap version

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×