el menu:
Código PHP:
<div class="arriba"><div id="mensaje_cabe">Tu Red Social
<?php
$valor=$count[0];
if(!empty($_SESSION['logueado_nombre']))
{
?>
<center><a href="">Inicio</a> | <a href="privados/index.php">Mensajes<span class="numero"> <?php if($valor>0){echo "$count[0]";}else{}?></span></a> | <a href="gente.php">Gente</a> | <a href="fotos.php">Fotos</a>| <a href="#">Perfil</a></center>
<div id="opcionesDeCuenta"><span onClick="mostrarMenu(this)"><img src="Img/flecha.jpg" width="39" height="33"></span>
<ul>
<ul id="aDeslizar" style="display:none">
<li><a href="#">Cuenta</a></li>
<li><a href="#">Privacidad</a></li>
<li><a href="logout.php">Salir</a></li>
</ul>
</ul>
</div>
</div>
</div>
Código PHP:
addEvent(window,'load',inicializarEventos,false);
function inicializarEventos()
{
addEvent(window,'scroll',cambioScroll,false);
}
function cambioScroll(e)
{
var mensaje = document.getElementById("mensaje_cabe");
mensaje.style.top = document.body.scrollTop;
}
function addEvent(elemento,nomevento,funcion,captura)
{
if (elemento.attachEvent)
{
elemento.attachEvent('on'+nomevento,funcion);
return true;
}
else
if (elemento.addEventListener)
{
elemento.addEventListener(nomevento,funcion,captura);
return true;
}
else
return false;
}
Código PHP:
body {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
/*margin: 2px;*/
background-image:url(../Img/fondo.gif);
background-repeat:repeat-x;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
color:#666666;
}
#mensaje_cabe
{
position:absolute;
left: 0px;
width: 1024px;
height: 50px;
border:#0000FF;
background-image:url(../Img/fondo.gif);
background-repeat:repeat-x;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
color:#666666;
}