Can someone help me figure out how to center a div
inside an image? I seem to be having trouble with the positioning and alignment. Any suggestions or advice would be greatly appreciated. Thanks!
.template-banner{
width: 100%;
height: auto;
margin: 0;
}
.template-banner-wrpr{
width: 100%;
height: 500px;
}
.template-banner-img {
content: url("../img/template-banner.jpg");
width: 100%;
height: 500px;
}
.tbanner-reg-wrpr1{
width: 100%;
height: 500px;
}
.tbanner-reg-wrpr{
width: 100%;
position: absolute;
top: 50%;
right: -50%;
margin: 0 auto;
height: 500px;
}
.tbanner-reg-desc-wrpr{
width: 680px;
float: left;
height: 285px;
}
.tbanner-reg-input{
width: 270px;
float: left;
background-color: rgb(247,247,247);
border-radius: 5px;
padding: 10px 25px 25px 25px;
height: 250px;
}
.tbanner-reg-input p{
font-size: 20px;
font-weight: bold;
}
.tbanner-loginb{
background-color: #ff3b30;
border: solid #ff3b30 1px ;
border-color: #ff3b30;
color: white;
font-weight: bold;
}
.tbanner-regemail, .tbanner-regpsw, .tbanner-regpnumber, .tbanner-loginb {
width: 100%;
padding: 10px;
margin: 5px 0px 10px 0px;
border-radius: 5px;
border-width: 1px;
border-style: line;
border-color: rgb(249,249,249);
}
.template-features {
width: 100%;
height: auto;
text-align: center;
background-color: rgb(246,244,245);
}
<div class="template-banner">
<div class="template-banner-wrpr1"><img class="template-banner-img"></div>
<div class="tbanner-reg-wrpr">
<div class="tbanner-reg-desc-wrpr">
<h3 p id="tbanner-reg-desc-title">Heading Division 1</h3>
<p id="tbanner-reg-desc-info">Text hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText hereText here</p>
</div>
<div class="tbanner-reg-input"><p>Registration/Image</p>
<input type="text" placeholder="Your work email" name="wemail" class="tbanner-regemail">
<input type="password" placeholder="Your Password" name="psw" class="tbanner-regpsw">
<input type="text" placeholder="090-1234-5678" name="pnumber" class="tbanner-regpnumber">
<input type="submit" name="gstarted" value="Signup" class="tbanner-loginb">
</div>
</div>
</div>