Posted By

manavecplan on 09/12/10


Tagged


Versions (?)

Create box sytles


 / Published in: PHP
 

  1. function box($atts, $content = null) {
  2. return '
  3. <div class="box">;'.$content.'</div>
  4. ';
  5. }
  6. add_shortcode('box', 'box');[php]
  7. The css:
  8. [css].box {
  9. background:#bfe4f9;
  10. border:1px solid #68a2cf;
  11. -moz-border-radius: 5px;
  12. -webkit-border-radius: 5px;
  13. padding:10px
  14. }[/css]
  15. Using:
  16. [html][box]Mauris ut lectus erat. In condimentum, turpis ac ultricies laoreet, felis ante aliquet nulla, vitae volutpat nunc sapien eget quam. Proin auctor auctor mollis. Curabitur congue sem ante, luctus euismod lorem. In iaculis ultrices lorem, ut viverra ipsum fringilla.[/box][/html]
  17. <h3>Create Dropcaps</h3>
  18. <img src="http://www.tuttoaster.com/wp-content/uploads/2010/06/dropcap1.png" alt="dropcap" width="517" height="96" />
  19.  
  20. The code:
  21. [php]function dropcap($atts, $content = null) {
  22. return '
  23. <div class="dropcap">'.$content.'</div>
  24. ;';
  25. }
  26. add_shortcode('dropcap', 'dropcap');
  27. ]
  28.  
  29.  
  30. .dropcap {
  31. display:block;
  32. float:left;
  33. font-size:50px;
  34. line-height:40px;
  35. margin:0 8px 0 0;
  36. }
  37.  
  38.  
  39. <SPAN class=dropcap>M</SPAN>auris ut lectus erat. In ...

Report this snippet  

You need to login to post a comment.