I'm trying to make the image overflow not just in left and right but also in the top and bottom. I'm not sure if the problem is in my css or html.
.sectionForm {
margin: 0 auto;
background: url("https://image.flaticon.com/icons/svg/1914/1914882.svg") no-repeat center center;
background-size: 190% auto;
}
.sectionForm { margin: 0 auto; background: url("https://image.flaticon.com/icons/svg/1914/1914882.svg") no-repeat center center; background-size: 190% auto; } .sectionForm form { width: 400px; box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.2); border-radius: 40px; background-color: white; } .form-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 66px 0 50px 0; } footer { height: 1500px; } .form-container input { border: none; border-bottom: 1px solid #828282; padding: 26px 0; margin-bottom: 100px; font-size: 20px; color: #4F4F4F; }
<br> <br> <br> <br> <br> <div class="sectionForm"> <form> <div class="form-container"> <input type="text" id="fname" name="fname" value="Nome"> <input type="text" id="lname" name="lname" value="E-mail"> <input type="text" id="lname" name="lname" value="Assunto"> </div> </form> </div> <br> <br> <br> <br> <br>
So i just needed to add padding to it
background-size: 160% auto; padding: 112px;
.sectionForm { margin: 0 auto; background: url("https://image.flaticon.com/icons/svg/1914/1914882.svg") no-repeat center center; background-size: 160% auto; padding: 112px; } .sectionForm form { width: 400px; box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.2); border-radius: 40px; background-color: white; } .form-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 66px 0 50px 0; } footer { height: 1500px; } .form-container input { border: none; border-bottom: 1px solid #828282; padding: 26px 0; margin-bottom: 100px; font-size: 20px; color: #4F4F4F; }
<br> <br> <br> <br> <br> <div class="sectionForm"> <form> <div class="form-container"> <input type="text" id="fname" name="fname" value="Nome"> <input type="text" id="lname" name="lname" value="E-mail"> <input type="text" id="lname" name="lname" value="Assunto"> </div> </form> </div> <br> <br> <br> <br> <br>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.