Ver Mensaje Individual
  #5 (permalink)  
Antiguo 24/07/2009, 09:57
Avatar de Negora
Negora
 
Fecha de Ingreso: agosto-2003
Mensajes: 122
Antigüedad: 23 años, 1 mes
Puntos: 5
Respuesta: Simular FrameSet con alturas en píxeles y porcentajes mediante IFRAME y CS

Deirdre: Por "suponido". Ahí va, a ver si podéis sacar algo en claro...

Código del primer intento mediante un DIV y un IFRAME:

Código PHP:
<!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>
    
        <
title>DIV + IFRAME test</title>
        <
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <
style type="text/css">
        <!--
        
            
/* COMMON RULES */
            
            
* { margin: 0px; padding: 0px; }
            
html, body { height: 100%; }
            
table { border: none; border-spacing: 0px; empty-cells: show; }
            
td { border: none;    text-align: left; vertical-align: top; }
            
            
            
/* SPECIFIC RULES TO SOLVE THIS TEST */
            
            
div { width: 100%; height: 50px; background-color: #FFCC00; }
            
iframe { width: 100%; height: 100%; border: none; }
            
        -->
        </
style>
        
    </
head>
    
    
    <
body>
    
        <
div>NAVIGATION MENU</div>
        <
iframe src="http://www.forosdelweb.com/" frameborder="0"></iframe>

    </
body>
    
</
html> 

Código del segundo intento mediante una TABLE y un IFRAME:

Código PHP:
<!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>
    
        <
title>TABLE + IFRAME test</title>
        <
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <
style type="text/css">
        <!--
        
            
/* COMMON RULES */
            
            
* { margin: 0px; padding: 0px; }
            
html, body { height: 100%; }
            
table { border: none; border-spacing: 0px; empty-cells: show; }
            
td { border: none;    text-align: left; vertical-align: top; }
            
            
            
/* SPECIFIC RULES TO SOLVE THIS TEST */
            
            
table { width: 100%; height: 100%; }
            
tr:first-child td { height: 50px; background-color: #FFCC00; }
            
tr + tr td { height: 100%; }
            
            
iframe { width: 100%; height: 100%; border: none; }
            
        -->
        </
style>
        
    </
head>
    
    
    <
body>
        
        <
table border="0" cellspacing="0" cellpadding="0">
            <
tr>
                <
td>
                    
NAVIGATION MENU
                
</td>
            </
tr>
            <
tr>
                <
td>
                    <
iframe src="http://www.forosdelweb.com/" frameborder="0"></iframe>
                </
td>
            </
tr>
        </
table>

    </
body>
    
</
html>