I want to border add in below picture
and I want border
add like
option text before and after and whole box
border css before
after
or background
how can achieve it?
I want to border add in below picture
and I want border
add like
option text before and after and whole box
border css before
after
or background
how can achieve it?
I see it says in the comments "not possible with legend an fieldset", but but it exactly reproduces the above:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<style>
body{
display: flex;
}
fieldset {
border-radius: .4em;
border-color: gray;
border-width: 1px;
}
legend:after {
content: '*';
color: red;
}
fieldset div {
display: grid;
grid-template-columns: auto auto;
grid-gap: .5em;
}
</style>
</head>
<body>
<form>
<fieldset>
<legend>Option:</legend>
<div>
<label for="not_toasted">Not Toasted</label>
<input type="radio" id="not_toasted" name="option">
<label for="toased">Toasted</label>
<input type="radio" id="toased" name="option">
</div>
<br>
</fieldset>
</form>
</body>
</html>