Making custom border html - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border Style

Description

Making custom border html

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.fancyBorder {<!--from   w  w w. ja  va2  s . c o m-->
   padding: 15px; /* this should probably be set at least to the width of your border image */
   background:
   url(https://www.java2s.com/style/demo/Firefox.png) top left no-repeat,
   url(https://www.java2s.com/style/demo/Firefox.png) top right no-repeat,
   url(https://www.java2s.com/style/demo/Firefox.png) bottom left no-repeat,
   url(https://www.java2s.com/style/demo/Firefox.png) bottom right no-repeat,
   url(https://www.java2s.com/style/demo/Firefox.png) top left repeat-x,
   url(https://www.java2s.com/style/demo/Firefox.png) bottom left repeat-x,
   url(https://www.java2s.com/style/demo/Firefox.png) top left repeat-y,
   url(https://www.java2s.com/style/demo/Firefox.png) top right repeat-y;
}


      </style> 
 </head> 
 <body> 
  <div class="fancyBorder">
    Here is some sample text. 
   <br> Here is some sample text. 
   <br> Here is some sample text. 
   <br> Here is some sample text. 
   <br> Here is some sample text. 
   <br> Here is some sample text. 
   <br> Here is some sample text. 
   <br> 
  </div>  
 </body>
</html>

Related Tutorials