Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/11/2007, 00:00
Avatar de virla
virla
 
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 9 meses
Puntos: 1
Re: igualar capas

mil gracias amigo Panino5001, funciona de mil maravillas, pero estoy queriendo hacer unas modificaciones haber si podes ayudarme

este es el codigo que he hecho de ejemplo para probarlo

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>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
div#contenedor {
    background-color: #FFFFFF;
    float: left;
    width: 410px;
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #333333;
}
div#content {background-color: #FFCC00;float: left;width: 200px;}
div#navigation {background-color: #0099FF;float: left;width: 200px;margin-left: 10px;}
-->
</style>
</head>
<script type="text/javascript">
    function setH() {
        var maxH = Math.max(document.getElementById('contenedor').offsetHeight,document.getElementById('content').offsetHeight);
        document.getElementById('content').style.height=maxH+'px';
        var maxH = Math.max(document.getElementById('contenedor').offsetHeight,document.getElementById('navigation').offsetHeight);
        document.getElementById('content').style.height=maxH+'px';
        document.getElementById('navigation').style.height=maxH+'px';
}
  
window.onload=setH;
</script>

<body>
<div id="contenedor">
    <div id="content">Colocar aquí el contenido de la nueva etiqueta Div</div>
    <div id="navigation">prueba</div>
</div>
</body>
</html>
lo que quiero es poder quitarle unos 10px al contenedor porque sino me estira todo unos 10px he probado poniendo
document.getElementById('content').style.height=ma xH+'px'-10;
pero como sabrán ustedes los capos en javascript me tiro un error.
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla