Non-Form Fieldset Using CSS

<section class="fieldset">
  <h1>This is not a fieldset</h1>
.fieldset {
  position: relative;
  border: 1px solid #ddd;
  padding: 10px;

.fieldset h1 {
  position: absolute;
  top: 0;
  font-size: 18px;
  line-height: 1;
  margin: -9px 0 0; /* half of font-size */
  background: #fff;
  padding: 0 3px;

See also  Page Accessibility Testing In Pure CSS - a11y-tests.css

Leave a Reply

Your email address will not be published. Required fields are marked *