Advertisement
jamietelin

Custom graphical border on DIV with CSS

May 8th, 2012
1,029
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 9.35 KB | None | 0 0
  1.  
  2. <!DOCTYPE>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>CSS Flow Design Test</title>
  6. <style type="text/css">
  7. <!--
  8. body {
  9.     background:#f4f3f3;
  10. }
  11. .flowBox {
  12.     background:#FFFFFF;
  13.     margin:10px;
  14.     float:left;
  15.     padding:10px;
  16.     width:250px;
  17.     position:relative;
  18. }
  19. .border_t {
  20.     background:url(border_t.png) repeat-x;
  21.     position:absolute;
  22.     top:-2px; left:0;
  23.     width:100%;
  24.     height:2px;
  25. }
  26. .border_b {
  27.     background:url(border_b.png) repeat-x;
  28.     position:absolute;
  29.     bottom:-6px; left:0;
  30.     width:100%;
  31.     height:6px;
  32. }
  33. .border_l {
  34.     background:url(border_l.png) repeat-y;
  35.     position:absolute;
  36.     top:0; left:-3px;
  37.     width:3px;
  38.     height:100%;
  39. }
  40. .border_r {
  41.     background:url(border_r.png) repeat-y;
  42.     position:absolute;
  43.     top:0; right:-6px;
  44.     width:6px;
  45.     height:100%;
  46. }
  47. .border_br {
  48.     background:url(border_br.png);
  49.     position:absolute;
  50.     bottom:-6px; right:-6px;
  51.     width:6px;
  52.     height:6px;
  53. }
  54. .border_bl {
  55.     background:url(border_bl.png);
  56.     position:absolute;
  57.     bottom:-6px; left:-3px;
  58.     width:3px;
  59.     height:6px;
  60. }
  61. .border_tr {
  62.     background:url(border_tr.png);
  63.     position:absolute;
  64.     top:-2px; right:-5px;
  65.     width:5px;
  66.     height:2px;
  67. }
  68. .border_tl {
  69.     background:url(border_tl.png);
  70.     position:absolute;
  71.     top:-2px; left:-2px;
  72.     width:2px;
  73.     height:2px;
  74. }
  75. .clear {
  76.     clear:both;
  77. }
  78. -->
  79. </style>
  80. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  81. <script src="http://masonry.desandro.com/jquery.masonry.min.js"></script>
  82. <script>
  83.  
  84. $(window).load(function(){
  85.  
  86.     $('#container').masonry({
  87.         // options
  88.         itemSelector : '.flowBox',
  89.     });
  90.  
  91. });
  92.  
  93. </script>
  94. </head>
  95.  
  96. <body>
  97. <div id="container">
  98. <div class="flowBox">
  99.     <h1>
  100.         Header 0    </h1>
  101.     nt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae. <div class="border_t"></div>
  102.     <div class="border_b"></div>
  103.     <div class="border_l"></div>
  104.     <div class="border_r"></div>
  105.     <div class="border_br"></div>
  106.     <div class="border_bl"></div>
  107.     <div class="border_tr"></div>
  108.     <div class="border_tl"></div>
  109. </div>
  110. <div class="flowBox">
  111.     <h1>
  112.         Header 1    </h1>
  113.      Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.    <div class="border_t"></div>
  114.     <div class="border_b"></div>
  115.     <div class="border_l"></div>
  116.     <div class="border_r"></div>
  117.     <div class="border_br"></div>
  118.     <div class="border_bl"></div>
  119.     <div class="border_tr"></div>
  120.     <div class="border_tl"></div>
  121. </div>
  122. <div class="flowBox">
  123.     <h1>
  124.         Header 2    </h1>
  125.     rutrum mollis pharetra. Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae. <div class="border_t"></div>
  126.     <div class="border_b"></div>
  127.     <div class="border_l"></div>
  128.     <div class="border_r"></div>
  129.     <div class="border_br"></div>
  130.     <div class="border_bl"></div>
  131.     <div class="border_tr"></div>
  132.     <div class="border_tl"></div>
  133. </div>
  134. <div class="flowBox">
  135.     <h1>
  136.         Header 3    </h1>
  137.     retra. Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.  <div class="border_t"></div>
  138.     <div class="border_b"></div>
  139.     <div class="border_l"></div>
  140.     <div class="border_r"></div>
  141.     <div class="border_br"></div>
  142.     <div class="border_bl"></div>
  143.     <div class="border_tr"></div>
  144.     <div class="border_tl"></div>
  145. </div>
  146. <div class="flowBox">
  147.     <h1>
  148.         Header 4    </h1>
  149.     mpus rhoncus sed quis neque. Aliquam erat volutpat. Sed rutrum mollis pharetra. Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae. <div class="border_t"></div>
  150.     <div class="border_b"></div>
  151.     <div class="border_l"></div>
  152.     <div class="border_r"></div>
  153.     <div class="border_br"></div>
  154.     <div class="border_bl"></div>
  155.     <div class="border_tr"></div>
  156.     <div class="border_tl"></div>
  157. </div>
  158. <div class="flowBox">
  159.     <h1>
  160.         Header 5    </h1>
  161.     estie. Duis non quam et elit tempus rhoncus sed quis neque. Aliquam erat volutpat. Sed rutrum mollis pharetra. Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.  <div class="border_t"></div>
  162.     <div class="border_b"></div>
  163.     <div class="border_l"></div>
  164.     <div class="border_r"></div>
  165.     <div class="border_br"></div>
  166.     <div class="border_bl"></div>
  167.     <div class="border_tr"></div>
  168.     <div class="border_tl"></div>
  169. </div>
  170. <div class="flowBox">
  171.     <h1>
  172.         Header 6    </h1>
  173.     ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.   <div class="border_t"></div>
  174.     <div class="border_b"></div>
  175.     <div class="border_l"></div>
  176.     <div class="border_r"></div>
  177.     <div class="border_br"></div>
  178.     <div class="border_bl"></div>
  179.     <div class="border_tr"></div>
  180.     <div class="border_tl"></div>
  181. </div>
  182. <div class="flowBox">
  183.     <h1>
  184.         Header 7    </h1>
  185.     itae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.   <div class="border_t"></div>
  186.     <div class="border_b"></div>
  187.     <div class="border_l"></div>
  188.     <div class="border_r"></div>
  189.     <div class="border_br"></div>
  190.     <div class="border_bl"></div>
  191.     <div class="border_tr"></div>
  192.     <div class="border_tl"></div>
  193. </div>
  194. <div class="flowBox">
  195.     <h1>
  196.         Header 8    </h1>
  197.     ectetur adipiscing elit. Sed magna ligula, fringilla at tempor ac, sagittis eu metus. Duis tempus malesuada nisl ac molestie. Duis non quam et elit tempus rhoncus sed quis neque. Aliquam erat volutpat. Sed rutrum mollis pharetra. Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.   <div class="border_t"></div>
  198.     <div class="border_b"></div>
  199.     <div class="border_l"></div>
  200.     <div class="border_r"></div>
  201.     <div class="border_br"></div>
  202.     <div class="border_bl"></div>
  203.     <div class="border_tr"></div>
  204.     <div class="border_tl"></div>
  205. </div>
  206. <div class="flowBox">
  207.     <h1>
  208.         Header 9    </h1>
  209.     itae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.   <div class="border_t"></div>
  210.     <div class="border_b"></div>
  211.     <div class="border_l"></div>
  212.     <div class="border_r"></div>
  213.     <div class="border_br"></div>
  214.     <div class="border_bl"></div>
  215.     <div class="border_tr"></div>
  216.     <div class="border_tl"></div>
  217. </div>
  218. <div class="flowBox">
  219.     <h1>
  220.         Header 10   </h1>
  221.     olutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.    <div class="border_t"></div>
  222.     <div class="border_b"></div>
  223.     <div class="border_l"></div>
  224.     <div class="border_r"></div>
  225.     <div class="border_br"></div>
  226.     <div class="border_bl"></div>
  227.     <div class="border_tr"></div>
  228.     <div class="border_tl"></div>
  229. </div>
  230. <div class="flowBox">
  231.     <h1>
  232.         Header 11   </h1>
  233.     m ipsum dolor sit amet, consectetur adipiscing elit. Sed magna ligula, fringilla at tempor ac, sagittis eu metus. Duis tempus malesuada nisl ac molestie. Duis non quam et elit tempus rhoncus sed quis neque. Aliquam erat volutpat. Sed rutrum mollis pharetra. Nullam vel enim non risus imperdiet accumsan ut at est. Phasellus vel interdum diam. Praesent volutpat purus sed justo consequat ut faucibus est laoreet. Sed ultrices fringilla magna nec pellentesque. Aliquam mattis pretium nibh vel tincidunt. Vivamus tincidunt placerat diam, a iaculis sem ultricies vitae. Praesent vestibulum dignissim sem, eget bibendum dui sodales vitae.   <div class="border_t"></div>
  234.     <div class="border_b"></div>
  235.     <div class="border_l"></div>
  236.     <div class="border_r"></div>
  237.     <div class="border_br"></div>
  238.     <div class="border_bl"></div>
  239.     <div class="border_tr"></div>
  240.     <div class="border_tl"></div>
  241. </div>
  242. </div>
  243. <div class="clear"></div>
  244. </body>
  245. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement