I'm looking to create a stylish border around my HTML component. While I know the HTML legend element can achieve this, I want to use it outside of a form.
For reference on using HTML Legend: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_fieldset
I attempted to apply a border but encountered issues with the title and alignment. You can see the code snippet below:
.temp {
border: 1px solid #999;
margin-top: 20px;
padding: 20px;
position: relative;
}
Here is the link to the jsfiddle demonstrating the issue: http://jsfiddle.net/alpeshprajapati/a6a93fg9/1/
Any suggestions on how I can achieve a similar output as the legend element would be greatly appreciated. Thank you!