Foros del Web » Creando para Internet » CSS »

overflow no se aplica

Estas en el tema de overflow no se aplica en el foro de CSS en Foros del Web. Ejemplo Bueno: Código HTML: <table border= "1" style= "table-layout:fixed; width:500px" > <tr> <td style= "width:100px;" > <div style= "overflow:scroll; width:100%" > 10000000000000000000000000000000000 </div> </td> <td> ...
  #1 (permalink)  
Antiguo 05/12/2014, 21:43
 
Fecha de Ingreso: enero-2008
Mensajes: 580
Antigüedad: 16 años, 2 meses
Puntos: 9
overflow no se aplica

Ejemplo Bueno:
Código HTML:
<table border="1" style="table-layout:fixed; width:500px">
  <tr>
    <td style="width:100px;"><div style="overflow:scroll; width:100%">10000000000000000000000000000000000</div></td>
    <td>200</td>
    <td>300</td>
  </tr>
</table> 
Ejemplo malo:
Código HTML:
<!DOCTYPE html>
<html lang="es">
<head>
	<meta charset="UTF-8"/>
	<title>Document</title>
<style>
body{
	background-color: silver;
	display: table;
	table-layout:fixed;
	margin: 0;
	height: 100vh;
	width: 100px;
	>*{
		display: table-row;
		vertical-align: bottom;
	}
	main{
		height: 100%;
		width: 100%;
		overflow: scroll;
	}
	header,footer{
		height: auto;
		width: auto;
	}
}
</style>
</head>
<body>
	<header>header</header>
	<main>
		main<br>
		main<br>
		main<br>
		
<table border="1" style="table-layout:fixed; width:500px">
  <tr>
    <td style="width:100px;"><div style="overflow:scroll; width:100%">10000000000000000000000000000000000</div></td>
    <td>200</td>
    <td>300</td>
  </tr>
</table>
	</main>
	<footer>footer</footer>
</body>
</html> 
  #2 (permalink)  
Antiguo 05/12/2014, 22:19
 
Fecha de Ingreso: enero-2008
Mensajes: 580
Antigüedad: 16 años, 2 meses
Puntos: 9
Respuesta: overflow no se aplica

Parece que esta es la única forma ¿es un bug?

Código HTML:
body{
	background-color: silver;
	display: table;
	margin: 0;
	height: 100vh;
	width: 100%;
	>*{
		display: table-row;
	}
	main{
		height: 100%;
		width: 100%;
		>div{ /*anidación de LESS*/
			height: 100%;
			width: 100%;
			overflow: auto;
		}
	}
	header,footer{
		height: auto;
		width: auto;
	}
}
Código HTML:
<!DOCTYPE html>
<html lang="es">
<head>
	<meta charset="UTF-8"/>
	<title>Document</title>
	<link rel="stylesheet" href="style.css"/>
</head>
<body>
	<header>header</header>
	<main>
		<div>
			Texto<br>
			Texto<br>
		</div>
	</main>
	<footer>footer</footer>
</body>
</html> 

Etiquetas: background, color, html, overflow, width
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:15.