JSFiddle - React, Tailwind, and code Playground

by Wexcode

HTML

<form method="get" action="">
    <fieldset>
        <legend>Such a pesky element</legend>
        <p><span>Some description</span></p>
    </fieldset>
</form>

<div id="divide"></div>

<form method="get" action="">
    <fieldset style="padding: 10px 0 0;">
        <legend>Such a pesky element</legend>
        <p><span>Some description</span></p>
    </fieldset>
</form>

CSS

legend {
    width: 100%;
    padding: 0 0 5px;
    border-bottom: 1px solid #000; }

p {
    background: blue;
    font-family: Verdana;
    font-weight: bold;
    color: #fff;
    width: 100%;}
p span {
    padding: 10px;
    display: inline-block; }

#divide {
    height: 1px;
    margin: 20px 0;
    border-bottom: 1px dashed #000; }