Is it possible to change the width of an input without using HTML? I had set the size to "35" and it looked fine on the site (check here at the bottom of the site) until I started working on the mobile version. Now, with a size of 35, it appears very wide and I'm unsure how to maintain the same look. On the mobile version, I want to display it in flex-direction: column. What am I doing wrong?
I attempted something like this:
input [type=text] {
width: 60%;}
But for some reason, it only affects two of my input boxes.
Thank you!
.bcs_za_form {
width: 100%;
background-color: #646C8E;
height: 790px;
}
.textnadform {
padding-top: 50px;
text-align: center;
font-size: 35px;
color: #ffffff;
width: 100%;
font-family: 'Montserrat',Helvetica,Arial,Lucida,sans-serif;
}
.zanech {
font-size: 17px;
color: rgba(255,255,255,0.5);
font-weight: 600;
}
.celyform {
width: 100%;
}
.formular_2 {
padding-top: 50px;
display: flex;
justify-content: center;
}
.formular_4 {
border: 1px solid #ffffff;
font-family: 'Montserrat',Helvetica,Arial,Lucida,sans-serif;
font-weight: 600;
font-size: 14px;
color: white;
background-color: #646C8E;
padding-top: 25px;
padding-right: 30px;
padding-bottom: 25px;
padding-left: 30px;
border-radius: 10px;
}
.formular_4::placeholder {
color: #ffffff;
}
.prvedva {
margin-bottom: 1%;
flex-grow: inherit;
display: flex;
width: 100%;
}
.druhedva {
margin-bottom: 3%;
flex-grow: inherit;
display: flex;
width: 100%;
}
.druhy {
padding: 0px 0px 0px 20px;
}
.stvrty {
padding: 0px 0px 0px 20px;
}
input:focus,
select:focus,
textarea:focus,
button:focus {
outline: none;
}
textarea:focus ,
input:focus {
color: #3E3E55;
}
<div class="bcs_za_form" id="Kontakt">
<div class="celyform">
<div class="textnadform">
<p class="napismi">Contact Me</p>
<p class="zanech">Leave me a message and I will get back to as soon as possible.</p>
</div>
<div class="formular_2">
<form class="formular_3" action="kontakt.php" method="post">
<div class="prvedva">
<input class="formular_4" type="text" name="meno" placeholder="Name" size="35">
<div class="druhy">
<input class="formular_4" type="text" name="priezvisko" placeholder="Surname" size="35">
</div>
</div>
<br>
<div class="druhedva">
<input class="formular_4" type="text" name="telcislo" placeholder="Phone Number" size="35">
<div class="stvrty">
<input class="formular_4" type="text" name="mail" placeholder="Your E-mail" size="35">
</div>
<br>
</div>
<div class="">
<textarea class="formular_4" name="sprava" placeholder="Message" cols="85" rows="8"></textarea>
</div>
</form>
</div>