Ver Mensaje Individual
  #10 (permalink)  
Antiguo 14/01/2013, 18:11
el_loco90
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Respuesta: ColorBox redimensionable (ejemplo)

Cita:
Iniciado por gebremswar Ver Mensaje
el_loco90. No me extraña que algo que estando mal "funcione" en IE y que por obvias razones no lo haga en Firefox o Chrome.

Dejando de lado ese tema. Revisa este ejemplo que preparé:

index.html
Código Javascript:
Ver original
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Primary ColorBox</title>
  6. <link rel="stylesheet" type="text/css" href="../../JQueryPlugin/colorbox/example1/colorbox.css">
  7. <script src="http://code.jquery.com/jquery.min.js"></script>
  8. <script src="https://raw.github.com/jackmoore/colorbox/master/colorbox/jquery.colorbox.js"></script>
  9. <script>
  10. $(function(){
  11.     $('a.primary').colorbox({iframe:true, height:"200", width:"300", scrolling:false})
  12. });
  13. </script>
  14. </head>
  15. <body>
  16. <div id="site">
  17.     <a href="colorbox-primary.html" class="primary">Primary ColorBox</a>
  18. </div>
  19. </body>
  20. </html>

colorbox-primary.html
Código HTML:
Ver original
  1. <!doctype html>
  2. <meta charset="utf-8">
  3. <title>Primary ColorBox</title>
  4. <style type="text/css">
  5. #wrapper {background-color:yellow;height:200px;width:300px}
  6. </head>
  7. <div id="wrapper">
  8.    <div>PRIMARY BOX</div>
  9.    <a href="colorbox-secondary.html" class="secondary">Secondary ColorBox</a>
  10. </div>
  11. </body>
  12. </html>

colorbox-secondary.html
Código Javascript:
Ver original
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Secondary ColorBox</title>
  6. <style>
  7. #page {background-color:greenyellow;height:300px;width:400px}
  8. </style>
  9. <script src="http://code.jquery.com/jquery.min.js"></script>
  10. <script src="https://raw.github.com/jackmoore/colorbox/master/colorbox/jquery.colorbox.js"></script>
  11. <script>
  12. $(function(){
  13.     parent.$.colorbox.resize({height:$('#page').height(),width:$('#page').width()});
  14. });
  15. </script>
  16. </head>
  17. <body>
  18. <div id="page">
  19. Content page
  20. </div>
  21. </body>
  22. </html>
Preparé el ejemplo partiendo del problema que describiste en el primer mensaje.

Importante: en el index.html cambia la ruta del la hoja de estilos del plugin colorbox.css por una que tengas disponible y prueba el ejemplo tal cual.

Coméntanos tus dudas.

Saludos.
gracias amigazo, este tema de incompatiblidad de lo navegadores me tiene locooo jaja

ahora instale el chorme y me sale todo mal, es decir tengo una tabla de 6 filas por ejemplo asi

1- registrate
2- formulario de registracion
3- compartidos en facebook
4- muestra los compartidos
5- publicidades
6- muestra la publicidades

entre el 4 y 6 lo muestra uno arriba de otro, es decir facebook con publicidades juntas cualquier cosa es, esta todo bien hecho no es algo dificil tampoco, cree una tabla con 6 filas a 230px y puse el contenido, me anduvo bien hasta ahora

te paso el codigo para que tenga una idea, pero a mi parecer esta perfecto ¿puede ser la maquina? en el localhost o internet me hace lo mismo

Código HTML:
Ver original
  1. <td width="23%" align="center" valign="top"><table width="290" border="0" align="right">
  2.       <tr>
  3.         <td class="categoriasprincipalindex"><span class="style5">Registrate</span>
  4.           <iframe src="registroinicio.php" name="window" width="290" marginwidth="0" height="135" scrolling="No" frameborder="0" id="window"></iframe></td>
  5.       </tr>
  6.       <tr>
  7.         <td class="resaltadoletrasindex">Compartidos</td>
  8.       </tr>
  9.       <tr>
  10.         <td class="categoriasprincipalindex"><div class="fb-activity" data-site="http://www.openlatino.com.ar" data-width="290" data-height="270" data-header="true" data-recommendations="false"></div></td>
  11.       </tr>
  12.       <tr>
  13.         <td class="resaltadoletrasindex">Open Publicidades </td>
  14.       </tr>
  15.       <tr>
  16.         <td class="categoriasprincipalindex"><table width="100%" border="0">
  17.             <tr>
  18.               <td width="35%"><a href="<?php echo (!empty($voyalapublicidad[1])?$voyalapublicidad[1]:"index.php") ;?>"><img src="<?php
  19.                     echo (!empty($linea1[1])?$fato[1]:"../images/bandera.gif");?>" alt=""
  20. width="91" height="70" border="0" /></a></td>
  21.               <td width="65%"><div align="left">
  22.                 <?php
  23.                  echo "<div style='ninguno'>";
  24.                   echo (!empty($linea1[1])?$linea1[1]:"Publicidad")."<br>";
  25.                   echo (!empty($linea2[1])?$linea2[1]:"Publicidad")."<br>";
  26.                   echo "</div>";
  27.                 ?>
  28.               </div></td>
  29.             </tr>
  30.             <tr>
  31.               <td><a href="<?php echo (!empty($voyalapublicidad[2])?$voyalapublicidad[2]:"index.php") ;?>"><img src="<?php echo (!empty($linea1[2])?$fato[2]:"../images/bandera.gif");?>" alt=""
  32. width="91" height="70" border="0" /></a></td>
  33.               <td><div align="left">
  34.                 <?php
  35.                echo "<div style='ninguno'>";
  36.                 echo (!empty($linea1[2])?$linea1[2]:"Publicidad")."<br>";
  37.                 echo (!empty($linea2[2])?$linea2[2]:"Publicidad")."<br>";
  38.                 echo "</div>";
  39.                 ?>
  40.               </div></td>
  41.             </tr>
  42.         </table></td>
  43.       </tr>
  44.     </table>