sembra al momento funzioni e quindi di aver risolto cosi:
codice:
//nella pagina dove vado ad includere i vari css es: default.htm
<head>
<title>Browser information Page</title>
<meta http-equiv = "Content-Type" content = "text/html; charset = iso-8859-1" >
<link rel = "stylesheet" type = "text/css" href = "css/cmf.css" >
<script type = "text/javascript" src = "js/browser_detection.js"> </script>
<script type = "text/javascript">browser_css('');
function browser_css( ) {
d = document;// shorthand so we don't have to write out document each time..
if ( ie5mac ) {
d.write('<link rel = "stylesheet" type = "text\/css" href = "css/ie5mac.css" />');
}
else if ( d.layers ){
d.write('<link rel = "stylesheet" type = "text\/css" href = "css/ns4x.css" />');
}
else if ( ie ){//per tutti gli IE
d.write('<link rel = "stylesheet" type = "text\/css" href = "css/IE.css" />');
}
else if ( moz ){//per firefox
d.write('<link rel = "stylesheet" type = "text\/css" href = "css/FF.css" />');
}
else if ( op ){//per opera
d.write('<link rel = "stylesheet" type = "text\/css" href = "css/OP.css" />');
}
else {
d.write('< link rel = "stylesheet" type = "text\/css" href = "css/moz5.css" />');
}
}
</script>
</head>
<body>
<div id="container">
//poi dentro questa directory "js/" inserisco questo file.js "browser_detection.js"
var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;
d = document;
n = navigator;
na = n.appVersion;
nua = n.userAgent;
win = ( na.indexOf( 'Win' ) != -1 );
mac = ( na.indexOf( 'Mac' ) != -1 );
lin = ( nua.indexOf( 'Linux' ) != -1 );
if ( !d.layers ){
dom = ( d.getElementById );
op = ( nua.indexOf( 'Opera' ) != -1 );
konq = ( nua.indexOf( 'Konqueror' ) != -1 );
saf = ( nua.indexOf( 'Safari' ) != -1 );
moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
ie = ( d.all && !op );
ie4 = ( ie && !dom );
/*
ie5x tests only for functionality. ( dom||ie5x ) would be default settings.
Opera will register true in this test if set to identify as IE 5
*/
ie5x = ( d.all && dom );
ie5mac = ( mac && ie5x );
ie5xwin = ( win && ie5x );
}
Questo al momento è quanto.
Ho una curiosità ancora, utilizzando questo metodo incorrerò in problemi e se si, mi dite quali?
Grazie mille....
PS: ho letto nella guida CSS le "media queries"