Posted By

mordecaix7 on 12/08/08


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

rickfu
charmcitycoder
wizard04


Image With Transparent Caption


 / Published in: CSS
 

URL: http://www.sohtanaka.com/web-design/spice-up-your-images-with-css/

Example is here: http://www.sohtanaka.com/web-design/examples/drop-shadow/caption.htm

  1. HTML:
  2.  
  3. <div class="img-desc">
  4. <img src="sample.jpg" alt="" />
  5. <cite>Salone del mobile Milano, April 2008 - Peeta</cite>
  6. </div>
  7.  
  8.  
  9. CSS:
  10.  
  11. .img-desc {
  12. position: relative;
  13. display: block;
  14. height:335px;
  15. width: 575px;
  16. }
  17. .img-desc cite {
  18. background: #111;
  19. filter:alpha(opacity=55);
  20. opacity:.55;
  21. color: #fff;
  22. position: absolute;
  23. bottom: 0;
  24. left: 0;
  25. width: 555px;
  26. padding: 10px;
  27. border-top: 1px solid #999;
  28. }

Report this snippet  

You need to login to post a comment.