Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/12/2012, 17:11
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
donde colocar elemento para limpiar float??

primero os muestro el código
Código:
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
* {
margin: 0; 
padding: 0;
border: none;
position: relative;
}


html, body {
width: 100%;
height: 100%;
}


#contenido {
display: block;
width: 100%;
height: 200%;
}


div.base-enun {
width: 100%;
height: 35px;
}


div#cont-enun {
width: 100%;
height: 35px;
position: fixed;
top: 0;
left: 0;
background-color: rgba(109, 106, 107, 0.85);
}


div#cont-enun span {
float:left;
}


div#cont-enun span.enun {
font: bold 13px Tahoma, Geneva, sans-serif;
color: #FFF;
padding: 0 15px 0 10px;
top: 6px;
}


div#cont-enun form {
float: right;
right: 2%;
}


div#cont-enun form input {outline: 0;}
</style>
</head>
<body>

<div class="base-enun"></div>

<div id="contenido"></div>

<div id="cont-enun">
<span class="enun">un texto</span>
<form>
<input type="button" value="suprimir" />
</form>
</div>

<span style="clear: both"></span>

</body>
</html>
la maquetación no puede ser variada a excepción de
Código:
<span style="clear: both"></span>
una vez dicho esto paso a detallar un poco el css. #con-enun es un elemento fijado, con top y left 0. sus elementos hijos (.enun y form) están flotados.

la pregunta es; donde coloco el span para limpiar los float?? las dos opciones que tengo son
  • en la posición que muestro en el código
  • entre .base-enun y #contenido
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}