Mirza Celik
Mirza Celik

Reputation: 63

Border around radio button

Here is what I want to achieve:

here is the link to the border

Can anyone help me replicate the border used there? I wrote the code for the radio buttons, they work but I just cant figure out how to do that border, how does the border stop before and after the word?

any help would be so appreciated!

Upvotes: 0

Views: 1667

Answers (1)

DSofa
DSofa

Reputation: 564

You can wrap your radio buttons with a <fieldset></fieldset> tag and your text with a <legend></legend> tag.

Example

<form>
 <fieldset>
  <legend>Personalia:</legend>
  Name: <input type="text"><br>
  Email: <input type="text"><br>
  Date of birth: <input type="text">
 </fieldset>
</form>

Upvotes: 2

Related Questions