How TO - Login Form Learn how to create a responsive login form with CSS. . width: 80%; /* Could be more or less, depending on screen size */ Tip: You can also use the following javascript to close the modal by clicking outside of the .