Usuario: alberto - Webeame Snippets


Añadir snippet

Últimos snippets de alberto



Evitar el cache de los css y js

Consiste en colocar en el link del css la fecha de modificación de la hoja de estilos.
  1. function version($file) {
  2. return $file.'?'.filemtime($file);
  3. }
  4.  
  5. <link href="<?php echo version('css.css'); ?>" rel="stylesheet" type="text/css" />
Visto en http://icebeat.bitacoras.com/post/283/evitar-el-cache-de-los-css-y-js

En PHP css javascript cache por alberto hace on 29/3/08 | Comentarios



Clearfix CSS Hack

  1. /* slightly enhanced, universal clearfix hack */
  2. .clearfix:after {
  3. visibility: hidden;
  4. display: block;
  5. font-size: 0;
  6. content: " ";
  7. clear: both;
  8. height: 0;
  9. }
  10.  
  11. .clearfix {
  12. display: inline-block;
  13. }
  14.  
  15. /* start commented backslash hack */
  16. * html .clearfix {
  17. height: 1%;
  18. }
  19. .clearfix {
  20. display: block;
  21. }
  22. /* close commented backslash hack */
Más info en http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack/

En CSS hack float clear por alberto hace on 17/2/08 | Comentarios