I\'d like to have a div that looks like this:
Is this possible to do with HTML + CSS
For a duplicate, here another option with transform, no fieldset ( and rounded border required in the duplicates) :
position or transform can help you too :
* { margin: 0; padding:0; box-sizing:border-box; } .fieldset { border: solid; color: #353fff; border-radius: 1em; margin: 2em 1em 1em; padding:0 1em 1em; } .legend { transform: translatey(-50%); width: max-content; background: white; padding: 0 0.15em; } .fieldset li { list-style-type: " - "; }
Some Title
- Item
- Item
- Item
- Item