I am trying to center my container with col-md-5 by using offset, however it is not perfectly centered. I have heard you can nest it within another container to center it, but are unsure how to do so. All my javascript links and bootstrap are present, but are not shown in the code below just to make it shorter for you all to read. I have attached my code below. Thank you for helping me learn and better my skills!
HTML
body {
background-image: url(../../Icons/violin.jpeg);
background-size: cover;
background-repeat: no-repeat;
}
#sign-up {
margin-top: 60px;
border-radius: 5px;
padding-bottom: 20px;
background: white;
}
.blue-button {
background-color: #00b4ff;
color: #fff;
margin-top: 7%;
margin-bottom: 3%;
width: 100%;
}
#logo {
margin-top: 20px;
}
h1 {
font-size: 1em;
font-weight: normal;
margin-top: 13px;
}
#individual {
display: block;
}
#parent {
display: none;
}
#small {
font-size: 0.8em;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<body>
<div class="container">
<div class="col-md-5 offset-md-3" id="sign-up">
<!-- Logo and Sign Up Text -->
<div class="text-center">
<img src="../../Logo/Logo.png" class="mx-auto" height="50" width="50" id="logo" />
<h1>Signing up as</h1>
</div>
<!-- Radio check 1 -->
<div class="form-check form-check-inline">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="radios" id="radio1" onclick="radioCheck()" checked> Individual
</label>
</div>
<!-- Radio check 2 -->
<div class="form-check form-check-inline">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="radios" id="radio2" onclick="radioCheck()"> Parent of a child
</label>
</div>
<!-- Individual Form -->
<form id="individual">
<!-- Individual First Name -->
<div class="form-group">
<input class="form-control" type="text" placeholder="First name" />
</div>
<!-- Individual Last Name -->
<div class="form-group">
<input class="form-control" type="text" placeholder="Last name" />
</div>
<!-- Individual Email -->
<div class="form-group">
<input class="form-control" type="email" placeholder="Email" />
</div>
<!-- Individual Password -->
<div class="form-group">
<input class="form-control" type="password" placeholder="Password" />
</div>
<!-- Individual's Birthday -->
<div class="form-group">
<label>Birthday</label>
<div class="form-inline">
<!-- Month -->
<select name="month" onChange="changeDate(this.options[selectedIndex].value);" class="form-control month-space">
<option value="na">Month</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<!-- Day -->
<select name="day" id="day" class="form-control ">
<option value="na">Day</option>
</select>
<!-- Year -->
<select name="year" id="year" class="form-control">
<option value="na">Year</option>
</select>
</div>
</div>
<button class="btn blue-button">Confirm</button>
</form>
<!-- Parent Form -->
<form id="parent" class="hidden">
<!-- Parent's Fist Name -->
<div class="form-group">
<input class="form-control" type="text" placeholder="Parent's first name" />
</div>
<!-- Parent's Last Name -->
<div class="form-group">
<input class="form-control" type="text" placeholder="Parent's last name" />
</div>
<!-- Parent Email -->
<div class="form-group">
<input class="form-control" type="email" placeholder="Email" />
</div>
<!-- Parent Password -->
<div class="form-group">
<input class="form-control" type="password" placeholder="Password" />
</div>
<!-- Child's first name -->
<div class="form-group">
<input class="form-control" type="text" placeholder="Child's first name" />
</div>
<!-- Child's Birthday -->
<div class="form-group">
<label>Child's birthday</label>
<div class="form-inline">
<!-- Month -->
<select name="month" onChange="changeDate(this.options[selectedIndex].value);" class="form-control month-space">
<option value="na">Month</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<!-- Day -->
<select name="day" id="day" class="form-control ">
<option value="na">Day</option>
</select>
<!-- Year -->
<select name="year" id="year" class="form-control">
<option value="na">Year</option>
</select>
</div>
</div>
<button class="btn blue-button">Confirm</button>
</form>
<p class="text-center" id="small">By signing up you agree to our <a href="#">Terms of Use</a> and <a href="#">Privacy Policy</a></p>
</div>
</div>
</div>
CSS