I'd like to move this form to the middle of my web page. I have it center aligned currently, but it is at the top of my webpage. I want it smack dab in the middle. I've been trying to google around but this has been a surprisingly difficult answer to find.
html
<body>
    <div class="form">
        <form action="./script.js" method="post">
            <ul>
                <li>
                    <label for="date">Date:</label>
                    <input type="date" id="date" name="date" step="0.1" min="0" 
                        placeholder="What's the date today?" size="50">
                </li>
                <li>
                    <label for="mileage">Mileage:</label>
                    <input type="number" id="mileage" name="mileage" step="0.1" min="0" 
                        placeholder="How many miles today?" size="50">
                </li>
                <li>
                    <label for="note">Notes:</label>
                    <textarea id="note" name="user_message" placeholder="How did the run feel?"></textarea>
                </li>
                <li class="button">
                    <button type="submit">Submit</button>
                </li>
            </ul>
        </form>
    </div>
</body>
</html>
CSS
div.form {
    display: block;
    text-align: center;
}
form {
    margin: 0 auto;
    width: 600px;
    padding: 1em;
    border: 1px solid lightgrey;
    border-radius: 1em;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
form li+li {
    margin-top: 1em;
}
 
     
     
    