I'm thinking the following...
@media only screen and (min-width: 600px) {
.form {
width: 600px}
}
Am I correct?
You don't really need a media query for this. If you set the width at 600px and a max-width to prevent it exceeding 100% it will work.
form { width: 600px; max-width: 100%; margin: 0 auto; }
<form> <fieldset> <legend>Example Form</legend> <div> <label>Name<br /><input type="text" name="name" /></label> </div> <div> <button>Submit</button> </div> </fieldset> </form>
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.