Adding a border to a fieldset element - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border Style

Description

Adding a border to a fieldset element

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">

fieldset {<!--from  w  w w.  ja v  a  2 s  .c o m-->
   border: 2px dotted #333;
   height: 340px;
   position: relative;
}
fieldset legend {
   position: absolute;
   top: 40px;
   left: 0;
   background: transparent;
}


      </style> 
 </head> 
 <body> 
  <form> 
   <fieldset> 
    <legend>I am</legend> 
   </fieldset> 
  </form>  
 </body>
</html>

Related Tutorials