, Guest!
Already a Member? Login or Register.



Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > changing website width

FlexCMS Support Forum

changing website width
Started April 9, 2009 @ 7:51pm by welby
Post Message 

Posts: 34
changing website width April 9, 2009 @ 7:51pm

First I have to say this script is fantastic.

Does anyone know how to change the width of the default template.

I like the way it appears on this website found under the Client Sites section: http://www.limestonecity.com/

Can't figure out where to change it so is stretches out like in the above website.

Thank you in advance.



Last Edit: April 9, 2009 @ 7:51pm by welby

Posts: 625
April 9, 2009 @ 11:00pm
What you see on LimestoneCity.com was an attempt at a new style of template, which you might see introduced into all the mainstream ones at some point in the future. It doesn't just stretch to a percentage or fixed amount, but uses Javascript to detect the screen resolution and then resizes it accordingly. If you want to duplicate that you need to add the following code to the very bottom of the template HTML, right above the </body> and </html> tags:

<script language="JavaScript">
if (screen.width > 0) {
if (screen.width >= 1800) { document.getElementById("MainTable").width="1200";
else if (screen.width >= 1600) { document.getElementById("MainTable").width="70%";
else if (screen.width >= 1200) { document.getElementById("MainTable").width="80%";
else if (screen.width >= 1024) { document.getElementById("MainTable").width="1000";

Then you need to add id="MainTable" to the main <table> tag towards the top of the HTML section, such as

<table width="780" height="600" border="0" cellpadding="0" cellspacing="0" id="MainTable">

If you want to just modify the width of any stock templates (aside from Photo Top -- because images can't stretch like a table can [side note: the LC template actually has a much wider top image but it's set as the background of the top table cell, so it can stretch to various sizes]), simply modify the width="###" or width="##%" of the main table to suit. It's a bit of a balancing act, because you have to take into consideration how it will look at a variety of screen sizes. I like to make it somewhere around 80% so it's not really huge at high resolutions, and then add a spacer image inside that table to force it out to a minimum of 780 pixels so it's not too small at low resolutions.

You can view the Systems Information section of the Counter & Stats module to see what resolutions the majority of your visitors are using. It can vary greatly depending on the type of users your site attracts, but most choose to design their sites to look decent at either 800 or 1024 width, depending on the type of traffic they attract.


FlexCMS v3.2 Has Been Released!

Last Edit: April 9, 2009 @ 11:02pm by DCSun

Posts: 34
Thanks DavidApril 10, 2009 @ 11:01am

Thank you very much for the code and support.


Post Message 

Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!


All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.11739 seconds.
Management Login

Powered By FlexCMS
Powered By FlexCMS