Reputation: 13
I am trying to have two inline radio buttons in ASP.NET MVC but the label and its corresponding radio button are not aligned to each other.` {terms and Condition goes here}
<label class="radio-inline">
<input type="radio" name="Terms" value="Yes" />Yes
</label>
<label class="radio-inline">
<input type="radio" name="Terms" value="No" />No
</label>
but my result does not have the radio button and the label together
Upvotes: 0
Views: 486
Reputation: 485
Put both in one div tag
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div>
<label class="radio-inline">
<input type="radio" name="Terms" value="Yes" />Yes
</label>
<label class="radio-inline">
<input type="radio" name="Terms" value="No" />No
</label>
</div>
</body>
</html>
Upvotes: 1