Mi scuso non lo sapevo.
Ecco il codice.
Per capirci si tratta di avere la classica cornice con sponsor intorno al sito. Tutta la cornice deve essere cliccabile. Se resizo la finestra la parte di cornice deve essere sempre cliccabile.
<html>
<body>
<script type="text/javascript" src="http://adv.ilsole24ore.it/0/jquery.js"></script>
<script language="javascript" type="text/javascript">
var hpbgimg = 'sfz_cornice_rockol_light.jpg';
var hpbgcolor = '';
var blink = 'http://www.google.it';
var pageWidth = jQuery(document).width();
var ffwidth = (pageWidth-1020)/2;
var iewidth = ffwidth-15;
var isIE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
if(isIE6){
jQuery(document).ready(function(){
var D = document;
var windowHeight = Math.max(Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),Math.max(D.body.of fsetHeight, D.documentElement.offsetHeight),Math.max(D.body.cl ientHeight, D.documentElement.clientHeight));
D.getElementById('bleft').style.height = windowHeight;D.getElementById('bright').style.heig ht = windowHeight;
});}
jQuery(window).resize(function() {
pageWidth = jQuery(document).width();
if(pageWidth <= 1024) {ffwidth = 0; iewidth = 0;} else {ffwidth = (pageWidth-1004)/2;iewidth = ffwidth-20;}
jQuery("#bleft,#bright").css("width",ffwidth);
if(isIE6){jQuery("#bleft,#bright").css("width",iew idth);}
});
document.write('<style>');
document.write('body{background:'+hpbgcolor+' url("'+hpbgimg+'") top center no-repeat fixed;}');
document.write('#btop{cursor: pointer; height: 95px; min-height: 95px; width: 100%;}');
document.write('#bleft{cursor: pointer; height: 100%;width:'+ffwidth+'px;position:fixed;top:0;left :0;_width:'+iewidth+'px;_float:left;}');
document.write('#bright{cursor: pointer; height: 100%;width:'+ffwidth+'px;position:fixed;top:0;righ t:0;_width:'+iewidth+'px;_float:right;}');
document.write('#wrapper{padding: 0 9px;}');
document.write('.top-banner{display: none;}');
document.write('</style>');
document.write('<div id="btop"> </div>');
if (screen.width>1024) {
document.write('<div id="bleft"> </div>');
document.write('<div id="bright"> </div>');
}
</script>

Rispondi quotando