-4
Good afternoon! So I was in sublime-text working with Responsive Design and everything. I made the design tags all right, then activated the extension that has on Google, whose extension adjusts the screen as you want, so you can see if your site is responsive or not. I made a basic form to test the responsive and when I went to test the extension, bugged everything and the form became smaller and all bugged, even I giving F5 the form did not return the normal proportions... I’ll post the code here for you and if anyone can see what I did wrong, I’ll be very happy.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width;initial-scale=1.0;maximum-scale=1.0"/> *
<title>Responsivo</title>
<style type="text/css">
*{box-sizing: border-box;margin: 0; padding: 0;}
/*Classes Auxiliares*/
.container{
max-width: 960px;
margin: 0 auto;
padding:0 30%;
}
.clear{
clear: both;
}
.w50{
float: right;
width: 100%;
padding: 0 10px;
}
.w100{
float: right;
width: 100%;
padding: 0 10px;
}
/* Estilo Prórpio*/
body{
background-color: rgb(225,225,225);
}
h2{
text-align: center;
color: #4286f4;
font-size: 25px;
font-weight: bold;
padding: 10px 0;
font-family: cursive;
}
.form-group label{
margin-bottom: 8px;
color: black;
}
.form-group input {
width: 100%;
padding-left: 8px;
height: 40px;
border: 1px solid black;
margin: 10px 0;
cursor: pointer;
border: 1px solid #ccc
}
@media screen and (max-width: 500px){
.w50{width: 100%;}
}
</style>
</head>
<body>
<div class="container">
<h2>Contact Us!</h2>
<br>
</div>
<div class="container">
<form>
<div class="w50" >
<div class="form-group">
<form>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname">
<input type="Button" name="Enviar" value="Enviar">
</form>
</div>
</div>
</form>
<br>
<br>
<div class="w50" >
<div class="form-group">
<form><form>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
</form>
<br>
<div class="w100" >
<div class="form-group">
<form>
<label for="email">Enter your email:</label>
<input placeholder="Put your email" type="email" id="email" name="email">
<div class="clear"></div>
</form>
</div>
</body>
</html>
You tried to use the inspect element? with the right mouse click on the page and inspect element. there is how to choose the responsive size you want, just above the site content. Put the full css code and html page, because you just put the container div down...
– Rodrigo Gomes
I apologize for not being able to help you in this case, but I wanted to give you a hint, don’t use px (pixels) as a unit of measure, there are others like the one in which it is much more recommended.
– Nathan Mancini
Take this 30% padding, the padding is based on the container width in this case, so you have 30% of the container width of each form’s Lada, which makes it "expressed"
– hugocsl
@Rodrigogomes Yes, I inspected and everything, but it turned out to be nothing
– Lucas Knorst
@Nathanmancini Seriously? Always use px qnd I will fzr something... But I will search the other units of measures. Thanks!
– Lucas Knorst
@hugocsl aaaa yes, I get it. I’ll take a closer look at it! Thanks for your help
– Lucas Knorst