Posted By

mrwolfgraphics on 12/23/10


Tagged

css border body


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

saman


Page borders in pure CSS


 / Published in: CSS
 

URL: http://csswizardry.com/2010/12/simplified-page-borders-in-pure-css/

Inserire bordi alla pagina tramite CSS

  1. /*------------------------------------*\
  2. BORDERS
  3. \*------------------------------------*/
  4.  
  5. /* Create a series of empty pseudo-elements... */
  6. html:before,html:after,body:before,body:after{
  7. content:"";
  8. background:#dad8bb;
  9. position:fixed;
  10. display:block;
  11. z-index:5;
  12. }
  13.  
  14. /* ...and position them! */
  15. html:before{
  16. height:10px;
  17. left:0;
  18. right:0;
  19. top:0;
  20. }
  21. html:after{
  22. width:10px;
  23. top:0;
  24. right:0;
  25. bottom:0;
  26. }
  27. body:before{
  28. height:10px;
  29. right:0;
  30. bottom:0;
  31. left:0;
  32. }
  33. body:after{
  34. width:10px;
  35. top:0;
  36. bottom:0;
  37. left:0;
  38. }

Report this snippet  

You need to login to post a comment.