Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

how to make it NOT stretch to fit browser window


Recommended Posts

Hi Kevin,


There are several ways to do this (see contributions section), but I made this simple solution myself.


Needs installed: BTS v1 (basic template system) + "patch a", I don't know if it can be done easy without it. The template system is also very handy for a other design editing.


Edit catalog/templates/main_page.tpl.php


<body >


<body >

<div id="siteBorder">


and change (at the end of the file offc.):






and edit catalog/stylesheet.css :

add (where ever you like):

/* added styles PM*/

body {text-align: center;}

div#siteBorder {margin: 10px auto; width: 790px;}

/* end new added styles */


You can skip the /* comment */ ofcourse

Both "text-align: center" and "margin: auto" are essential to center both in IE and Mozilla/Netscape!


working/testing example at: http://www.televisiedokter.nl/catalog/


If you try, please let me know if it works for you also!

Link to comment
Share on other sites

I think my solution is different and has some



1) will probably work with most future and past releases also (even very easy to make it work with other websites)

2) the width is controlled by the style sheet, which I personally think is a better solution (more control better, understanding).

3) it also makes it very easy to add nice and advanced borders, padding, margins etc (only very basic CSS knowledge needed)



1) if you nothing about HTML and CSS one might not understand how it works

2) not cotrolled by admin pages


I think the contribution is great for people who don't want to understand how or why it works only want a quick but probably temporary (one version) fix to size and center the shop. But for example to add borders margins etcetera you will have to look for additional distibutions then.

Link to comment
Share on other sites

Installing the BTS will not be quicker than installing Center Shop. Otoh, you will gain more flexibility from it in the long term.


I'm not saying that yours is a bad idea; however, due to the size of the BTS, it is a very large idea. Further, it makes it harder to give support, as the BTS is very different from the standard layout and has an entirely different set of potential pitfalls.




Link to comment
Share on other sites

Installing the BTS will not be quicker than installing Center Shop. Otoh, you will gain more flexibility from it in the long term.

I did not say it would be quicker to install. But if people already use the BTS this solution is much more flexible I think.

By the way, the BTS is not really needed for it, any template system, or even only header and footer files which are incuded in all pages, will do.


Now I think of it, it can also easily be used to align, set size or set borders etcetera to all separate parts of the osC page independant of each other (needs only a few lines of extra code).


For example:

a header: 100% wide, no borders, 10px margin-top

and a "body": 790px wide, double 3px border

and a footer: 50% wide, 5px border, 10px margin-bottom

would only take a few minutes to apply.


The cascading style sheets system is quite easy to learn and fun and efficient to use for all website layout (I'm sure you knew all this already). :)


If one is not afraid of doing some simple coding, layout changes are much easyer to do with the stylesheet than using a bunch of contributions. There is a big change the contributions will do a lot you don't want and will not have several features you do want.

Link to comment
Share on other sites


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

  • Create New...