Posted By

selfmadepsyche on 01/28/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

snipplrhanz
careca


Create Resizable Images With CSS


 / Published in: CSS
 

URL: http://www.smileycat.com/miaow/archives/000648.php

  1. HTML:
  2.  
  3. <div class="resize2"><img src="image.jpg" alt="" /></div>
  4.  
  5.  
  6. CSS:
  7.  
  8. .resize2 {
  9. border: 3px double #333;
  10. float: left;
  11. height: 12em;
  12. margin: .2em 1em 1em 0;
  13. overflow: hidden;
  14. width: 12em;
  15. }
  16.  
  17. .resize2 img {
  18. margin: -220px 0 0 -210px;
  19. padding: 6em 0 0 6em;
  20. }

Report this snippet  

You need to login to post a comment.