Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2010, 15:38
manuestaire
 
Fecha de Ingreso: noviembre-2010
Ubicación: Madrid
Mensajes: 7
Antigüedad: 13 años, 5 meses
Puntos: 0
Pregunta Anuncio flotante, problema con el fondo

Hola, vereís, tengo un problema un tanto extraño con un código para colocar un anuncio flotante que he usado a modo de barra de navegación, vereís, en todos los navegadores en los que he probado, al hacer scroll hacia abajo el fondo de la capa con la barra hace scroll también hasta que desaparece... (añadid unos cuantos saltos de línea para poder ver el efecto)
Como aspecto secundario, en Internet explorer la barra no ocupa el ancho completo de la página, si por casualidad también localizaís el motivo os lo agradecería.

Código HTML:
<head>
<style type="text/css">
a
{
color: #C0C0C0;
}
a:visited
{
color: #C0C0C0;
}
a:active
{
color: #C0C0C0;
}
a:hover
{
color: #FF8000;
}
#Layer1 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:1;
}
</style>
</head>
<body>
<script type='text/javascript'>
//<![CDATA[
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 0 //set x offset of bar in pixels
var startY = 1 //set y offset of bar in pixels
var verticalpos="frombottom" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("anuncio").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("anuncio").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("anuncio");
stayTopLeft();
}
if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
//]]>
</script>
<div id="anuncio" style="position:absolute; bottom:0px; width:100%; background:url(http://img19.imageshack.us/img19/3581/mitu1.png) repeat">
  <div style="float:left; margin-top:5"><img src="http://img4.imageshack.us/img4/7130/mitu3.png" align="CENTER"border="0" style="width:1px;height:25px;">
 
    <font style="font-size:12px" color="#C0C0C0" face="Bauhaus 93"><a href="http://www.rctplus.es/webphp/index.html" target="_blank" class="style3"><img src="http://www.rctplus.es/webphp/nw5.gif" width="13" height="13" border="0">LA WEB</a>
 
    <img src="http://img4.imageshack.us/img4/7130/mitu3.png" align="CENTER"border="0" style="width:1px;height:25px;"> 
 
    {USERLINK} <a href="http://rctplus.foroactivo.net/profile.forum?mode=editprofile&page_profil=friendsfoes" target="_blank" class="style3">AMIGOS E IGNORADOS</a>
 
  <img src="http://img4.imageshack.us/img4/7130/mitu3.png" align="CENTER" border="0" style="width:1px;height:25px;"> 
 
 
  <a href="http://rctplus.foroactivo.net/el-forum-f3/normas-funcionamiento-y-condiciones-de-uso-t75.htm" class="style3" target="_blank">CONSULTAR LAS NORMAS, FUNCIONAMIENTO Y CONDICIONES DE USO DEL FORO</a></font>
 
  <img src="http://img4.imageshack.us/img4/7130/mitu3.png" align="CENTER" border="0" style="width:1px;height:25px;"> </div>
 
    <div style="float:right; margin-top:5"><font style="font-size:12px" color="#C0C0C0">SIGUENOS EN:</font>
 
  <a href="http://www.tuenti.com/#m=Page&func=index&page_key=1_189_60503573" target="_blank"><img src="http://a.imageshack.us/img685/1344/tuenti.png" alt="TUENTI" align="top" border="0" style="width:20px;height:20px;"></a>

  <a href="http://www.facebook.com/pages/RCT-Plus-Community/101015956624296?v=wall" target="_blank"><img src="http://a.imageshack.us/img20/7850/facebookmn.png" alt="FACEBOOK" align="top" border="0" style="width:20px;height:20px;"></a>

  <a href="http://www.youtube.com/user/rctplus?blend=2&ob=1" target="_blank"><img src="http://a.imageshack.us/img409/6296/youtubeqy.png" alt="YOU TUBE" align="top" border="0" style="width:25px;height:24px;"></a>
 
  <img src="http://img4.imageshack.us/img4/7130/mitu3.png" align="CENTER" border="0" style="width:1px;height:25px;">
</div></div>
</body> 
Muchas gracias por vuestro tiempo

Última edición por manuestaire; 20/11/2010 a las 06:36