Foros del Web » Creando para Internet » CSS »

No se respetan las css

Estas en el tema de No se respetan las css en el foro de CSS en Foros del Web. Tengo una pagina web diseñada con html y algo de código en php , he hecho un formulario de login que al ingresar te dirige ...
  #1 (permalink)  
Antiguo 15/10/2010, 01:19
 
Fecha de Ingreso: agosto-2009
Mensajes: 26
Antigüedad: 14 años, 8 meses
Puntos: 0
Pregunta No se respetan las css

Tengo una pagina web diseñada con html y algo de código en php
, he hecho un formulario de login que al ingresar te dirige a la misma ( con algunas cosas que van apareciendo al loguear), mi problema es que al cargarla de nuevo, ya no me respeta la altura del div principal y se junta todo.
  #2 (permalink)  
Antiguo 15/10/2010, 01:40
Avatar de angelAparicio  
Fecha de Ingreso: julio-2009
Ubicación: Sevilla
Mensajes: 307
Antigüedad: 14 años, 9 meses
Puntos: 22
Respuesta: No se respetan las css

¿Se puede ver el código o la página en cuestión?
__________________
Mis webs:
- Programador Web Autónomo
- Conciertos en Sevilla
  #3 (permalink)  
Antiguo 15/10/2010, 07:17
 
Fecha de Ingreso: agosto-2009
Mensajes: 26
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: No se respetan las css

Por supuesto:

La pagina:
Código PHP:
<?php
session_start
();
?>
<!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" />
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<link rel="shortcut icon" href="favicon.ico" />
<title>mititulo</title>
</head>

<body background="images/background.jpg">
<?php
/* INCLUDE FILES !! */
include ("conect.php");
?>
<div class="container">

<div class="header">
<img class="logo" src="images/logo.png" />
<div class="login">
<?php
if (isset($_SESSION["username"])) {
} else {
?>
<table>
<form action="?op=login" method="POST">
<tr><td><label for="username">Username:</label></td><td><input size="15" type="text" name="username" tabindex="1" /></td></tr>
<tr><td><label for="password">Password:</label></td><td><input size="15" type="password" name="password" tabindex="2" /></td></tr>
<tr><td colspan="2"><center><input type="submit" value="Login" tabindex="3" /> <input type="reset" value="Reset" tabindex="4" /></center></td></tr>
</form>
</table>
</div>
<?php
}
?>

<div class="menudiv">
<center>
<a target="Content" href="main.html" class="menu">Home</a>
<a href="http://forum.lamia.es" target="_blank" class="menu">Forum</a>
<a target="Content" href="contact.html" class="menu">Contact</a>
<a href="about.html" target="Content" class="menu">About</a>
<?php 
if (isset($_SESSION['username'])) { 
echo 
'<a href="downloads.php" target="Content" class="menu">Download</a>';
echo 
'<a href="?op=logout" target="_top" class="menu">Logout</a>';
} else {
}
?>
</center>
</div>

</div>
<div class="ContentsRight">
<center></center>
</div>

<div class="contents">
<?php
if ( $_GET["op"] == "login" ) {
    
$user $_POST['username'];
    
$pass $_POST["password"];
    if (
trim($user) == "") {
        die(
"ERROR: The USERNAME field has not been filled.");
    }
    if (
trim($pass) == "") {
        die(
"ERROR: The PASSWORD field has not been filled.");
    }
    
$q "SELECT * FROM `main_users` WHERE `username`='".$user."' AND `password`='".$pass."'";
    
$r mysql_query($q);
    if ( 
$res = @mysql_fetch_object($r) ) {
        
$_SESSION["username"] = $res->username;
        
$_SESSION["email"] = $res->email;
        
?>
        <script language="javascript">
        window.location="http://lamia.es"; 
        </script>
        <?php
    
} else {
        die(
"ERROR: The login information you provided does not exist in out database.");
    }
    
} else {
    if (
$_GET["op"] == "logout") {
        
session_destroy();
        
?>
        <script language="javascript">
        window.location="http://lamia.es"; 
        </script>
        <?php
    
}
}
?>
<iframe allowtransparency="1" frameborder="no" name="Content" src="main.html" height="99%" width="99%" marginheight="10px" marginwidth="10px"></iframe>
</div>

<div class="footer">
<center><br /><img src="images/banner.png" /></center>
<b class="credits">Skin: &copy; </b>
<b class="copyright">&copy; </b>
</div>

</div>
</body>
</html>
El archivo CSS:

Código CSS:
Ver original
  1. body {
  2.     font:Verdana, Arial, Helvetica, sans-serif;
  3.     font-family:Verdana, Arial, Helvetica, sans-serif;
  4.     font-variant:small-caps;
  5. }
  6. .container {
  7.     width: 1400px;
  8.     height: 900px;
  9. }
  10. .header {
  11.     height: 15%;
  12.     border: 1px solid #000000;
  13.     background: #212121;
  14. }
  15. .contents {
  16.     border: 1px solid #000000;
  17.     height: 70%;
  18.     width: 85%;
  19.     background: #282828;
  20.     color: #079CFA;
  21. }
  22. .ContentsRight {
  23.     border: 1px solid #000000;
  24.     height: 70%;
  25.     width: 15%;
  26.     float: right;
  27.     clear: both;
  28.     background: #282828;
  29.     color: #079CFA;
  30. }
  31. .footer {
  32.     border: 1px solid #000000;
  33.     height: 15%;
  34.     background: #212121;
  35.     color: #FFFFFF;
  36. }
  37. .logo {
  38.     text-decoration: none;
  39.     color: #079CFA;
  40.     float:left;
  41.     margin: 1% 0 0 5%;
  42. }
  43. .login {
  44.     float: right;
  45. }
  46. .login label {
  47.     color: #636363;
  48. }
  49. .login input {
  50.     border: 1px solid #636363;
  51.     background: #212121;
  52.     color: #636363;
  53. }
  54. .menudiv {
  55.     text-decoration: none;
  56.     font-variant:small-caps;
  57.     clear: right;
  58.     margin: 1% 1% 0 0;
  59. }
  60. .menu {
  61.     text-decoration: none;
  62.     font-variant:small-caps;
  63.     color: #686868;
  64.     font-size: 24px;
  65.     margin: 0 2% 0 0;
  66. }
  67. .menu:hover {
  68.     text-decoration: overline underline;
  69.     color: #FFFFFF;
  70.     font-variant:small-caps;
  71. }
  72. .copyright {
  73.     text-decoration: none;
  74.     font-variant:small-caps;
  75.     color: #535353;
  76.     font-size: 12px;
  77.     float:right;
  78.     margin: 0 1% 0 0;
  79. }
  80. .copyright:hover {
  81.     color: #FFFFFF;
  82.     font-variant: small-caps;
  83. }
  84. .credits {
  85.     text-decoration: none;
  86.     font-variant:small-caps;
  87.     color: #535353;
  88.     font-size: 12px;
  89.     float:left;
  90.     margin: 0 0 0 1%;
  91. }
  92. .credits:hover {
  93.     color: #FFFFFF;
  94.     font-variant: small-caps;
  95. }
  #4 (permalink)  
Antiguo 15/10/2010, 07:41
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Tema movido desde PHP a CSS
  #5 (permalink)  
Antiguo 15/10/2010, 08:38
Avatar de angelAparicio  
Fecha de Ingreso: julio-2009
Ubicación: Sevilla
Mensajes: 307
Antigüedad: 14 años, 9 meses
Puntos: 22
Respuesta: No se respetan las css

Gracias, pero sin los archivos include, y la BD no puede probar el código. ¿Podrías poner un ejemplo en funcionamiento en algún servidor al que acceder desde aquí?

Otra opción y ya que el problema es de CSS, poner el HTML generado antes de enviar el formulario y el HTML de después de enviar.
__________________
Mis webs:
- Programador Web Autónomo
- Conciertos en Sevilla
  #6 (permalink)  
Antiguo 15/10/2010, 12:45
 
Fecha de Ingreso: agosto-2009
Mensajes: 26
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: No se respetan las css

Antes de enviar el formulario:

Código HTML:
<!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" />
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<link rel="shortcut icon" href="favicon.ico" />
<title></title>
</head>

<body background="images/background.jpg">
<div class="container">

<div class="header">
<img class="logo" src="images/logo.png" />
<div class="login">

<table>
<form action="?op=login" method="POST">
<tr><td><label for="username">Username:</label></td><td><input size="15" type="text" name="username" tabindex="1" /></td></tr>
<tr><td><label for="password">Password:</label></td><td><input size="15" type="password" name="password" tabindex="2" /></td></tr>
<tr><td colspan="2"><center><input type="submit" value="Login" tabindex="3" /> <input type="reset" value="Reset" tabindex="4" /></center></td></tr>
</form>
</table>
</div>

<div class="menudiv">
<center>
<a target="Content" href="main.html" class="menu">Home</a>
<a href="http://" target="_blank" class="menu">Forum</a>

<a target="Content" href="contact.html" class="menu">Contact</a>
<a href="about.html" target="Content" class="menu">About</a>
</center>
</div>

</div>
<div class="ContentsRight">
<center><br /><br /><br /> G<br />O<br />O<br />G<br />L<br />E<br /> <br />A<br />D<br />S<br />E<br />N<br />S<br />E<br /> </center>

</div>

<div class="contents">
<iframe allowtransparency="1" frameborder="no" name="Content" src="main.html" height="99%" width="99%" marginheight="10px" marginwidth="10px"></iframe>
</div>

<div class="footer">
<center><br /><img src="images/banner.png" /></center>
<b class="credits">Skin: &copy; </b>
<b class="copyright">&copy;  2010 - 2011</b>

</div>

</div>
</body>
</html> 
Generado depues de enviarlo:

Código HTML:
<!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" />
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<link rel="shortcut icon" href="favicon.ico" />
<title></title>
</head>

<body background="images/background.jpg">
<div class="container">

<div class="header">
<img class="logo" src="images/logo.png" />
<div class="login">

<div class="menudiv">
<center>
<a target="Content" href="main.html" class="menu">Home</a>
<a href="http://" target="_blank" class="menu">Forum</a>
<a target="Content" href="contact.html" class="menu">Contact</a>
<a href="about.html" target="Content" class="menu">About</a>
<a href="downloads.php" target="Content" class="menu">Download</a><a href="?op=logout" target="_top" class="menu">Logout</a></center>
</div>

</div>

<div class="ContentsRight">
<center><br /><br /><br /> G<br />O<br />O<br />G<br />L<br />E<br /> <br />A<br />D<br />S<br />E<br />N<br />S<br />E<br /> </center>

</div>

<div class="contents">
<iframe allowtransparency="1" frameborder="no" name="Content" src="main.html" height="99%" width="99%" marginheight="10px" marginwidth="10px"></iframe>
</div>

<div class="footer">
<center><br /><img src="images/banner.png" /></center>
<b class="credits">Skin: &copy; </b>
<b class="copyright">&copy;  2010 - 2011</b>

</div>

</div>
</body>
</html> 
  #7 (permalink)  
Antiguo 15/10/2010, 12:48
 
Fecha de Ingreso: agosto-2009
Mensajes: 26
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: No se respetan las css

Vale acabo de verlo yo jaja dios ... que tonteria mas grande, lo siento por las molestias, y tambien por el doble post, pero ya lo vi, era una div que no se cerraba.

Etiquetas: Ninguno
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 05:02.