, Guest!
Already a Member? Login or Register.

Menu



Showcase


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 
welby


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

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.

welby

 

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



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:
Code

<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";
}
}
</script>


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

<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.


David


FlexCMS v3.2 Has Been Released!
 

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


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

Thank you very much for the code and support.

welby
 

Post Message 




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

MEMBERS




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

Processing Time: 0.20496 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS