Please bear with me I am new, tired, and have been staring at this for hours.
Now I am using this tutorial [url]http://particletree.com/features/dynamic-resolution-dependent-layouts/
I belive I have everything set correctly but unfourtnetly it refuses to work. I don’t know why. I think it is having problems picking up my style sheets although my naming conventions appear to be correct.
Heres the guts of the code. From the js file.
// dynamicLayout by Kevin Hale
function dynamicLayout(){
var browserWidth = getBrowserWidth();
//Load main1152 CSS Rules
if (browserWidth >= 1152){
changeLayout(“main1152”);
}
}
Furthermore the changeLayout function is described as:
// changeLayout is based on setActiveStyleSheet function by Paul Sowdon
// [url]http://www.alistapart.com/articles/alternate/
function changeLayout(description){
var i, a;
for(i=0; (a = document.getElementsByTagName(“link”)[i]); i++){
if(a.getAttribute(“title”) == description){a.disabled = false;}
else if(a.getAttribute(“title”) != “default”){a.disabled = true;}
}
}
And here is the code from the html
<link rel=”stylesheet” type=”text/css” href=”styles/main1024.css” title=”default”/>
<link rel=”alternate stylesheet” href=”styles/main1152.css” title=”main1152″ type=”text/css”/>
As far as I can tell it is named correctly. This is frustrating to me since I am not getting an error I am just not getting the desired result.
html: [url]http://www.havokproductions.ca/htmlport/testindex.htm
js: [url]http://www.havokproductions.ca/scripts/dynamiclayout.js
Styles:[url]http://www.havokproductions.ca/styles/main1024.css
[url]http://www.havokproductions.ca/styles/main1152.css
Any help/advice/suggestions is appreciated.
Perhaps there is an easier way to do what I desire?