Hello,
html file
<html lang="en">
<body>
<form action="https://register-demo.freecodecamp.org">
<fieldset>
<label>Enter your name <input type="text" name="name"></label>
<label>Upload Profile Picture <input type="file" name="profile" required></label>
<input type="submit" value="Submit">
</fieldset>
</form>
</body>
</html>
CSS file
form{
width:60vw;
max-width:500px;
min-width:300px;
margin: auto auto;
}
label{
display:block;
margin: 0.5rem 0;
}
input{
/*giving its parent width*/
width:100%;
margin: 10px 0 0 0;
}
output
Why isn’t the “choose file” taking up the entire width of the form?