Search code examples
csshtml-input

Input border cutout for label cross section


I would like to put inputs label on border cross section and would like to hide borders under label like this enter image description here I did this by simply making label background white but it obviously doesn't work if I place it inside grey div any other solution for this?

Also I'm using quasar inputs so I'm limited to css only solutions


Solution

  • Use fieldset

    textarea {
      width: 100%;
      border: none;
    }
    <form>
      <fieldset>
        <legend>Your heading</legend>
        <textarea></textarea>
      </fieldset>
    </form>