Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/04/2011, 06:21
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 16 años, 5 meses
Puntos: 1012
Respuesta: Elemento con posición fija dentro de una DIV con scrollbars

no es absolute, sino fixed
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; http-equiv="Content-Type" charset=utf-8"/>
<title></title>
<style type="text/css">
.notice {
height: 285px;
width: 250px;
border: 1px solid black;
}

.notice p {
overflow: auto;
height: 250px;
width: 250px;
margin-top: 35px;
}

.notice div {
position: fixed;
width: 250px;
background-color: yellow;
padding: 0 0 8px 0;
}

.notice div > a {
float: right;
padding: 7px 40px 0 0;

}
</style>
</head>

<body>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. <br />Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type<br /> and scrambled it to make a type specimen book. <br />It has survived not only five centuries, but also the leap into electronic typesetting, remaining <br />essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,<br /> and more recently with desktop publishing software like Aldus PageMaker including <br />versions of Lorem Ipsum.<br /><br /><br />
<div class="notice">
<div><a href="#">Leer Mas</a></div>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</body>
</html>