Ver Mensaje Individual
  #5 (permalink)  
Antiguo 08/08/2011, 11:51
Avatar de juan_14nob
juan_14nob
 
Fecha de Ingreso: abril-2010
Mensajes: 552
Antigüedad: 14 años
Puntos: 6
Respuesta: <!--[if IE]> link <![endif]--> no funciona!

Cita:
Iniciado por Ag666 Ver Mensaje
no te modifica nada porque lo estas poniendo al inicio y después una hoja de estilos que sobre escribe al código que esta en tu comentario condicional

recuerda que en css hay niveles de prioridad e importancia

si pones

body{color:#f00;} y mas abajo body{color:#fe0;} la ultima regla sobre escribe a la primera por lo que tu texto se vera amarillo y no rojo

por otro lado también es importante declarar un doctype valido para que tu pagina funcione correctamente... así como debes escribir un código valido con respecto al doctype
tengo un problema al poner <!--[if IE]> si me cambia el estilo pero al poner <!--[if IE 8]> no me cambia nada , corregi las demas cosas.


Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Home</title>
  5. <script language="javascript">AC_FL_RunContent = 0;</script>
  6. <script src="AC_RunActiveContent.js" language="javascript"></script>
  7. <script src="jquery-1.5.js" type="text/javascript"></script>
  8. <link rel="stylesheet" href="css/index.css" media="screen" type="text/css" />
  9.  
  10.  
  11. <style type="text/css">
  12.  
  13.  
  14. .style1 {
  15.     margin-top: 0px;
  16. }
  17.  
  18.  
  19. <!--[if IE 8]>
  20.  
  21. <style type="text/css">
  22. #opciones-menu ul li a{
  23.     text-align: center;
  24.     color:blue;
  25.     font-family:Trebuchet MS;
  26.     text-decoration:none;
  27. }
  28. </style>
  29. <![endif]-->
  30.  
  31. </head>
  32.  
  33. </body>
  34. </html>