How can CSS be used to customize the appearance of form elements like text fields and buttons in a PHP login system?
To customize the appearance of form elements like text fields and buttons in a PHP login system, you can use CSS to style the elements to match your desired design. By targeting the specific form elements using CSS selectors, you can adjust properties such as color, size, font, and more.
<!DOCTYPE html>
<html>
<head>
<style>
/* Style for text fields */
input[type="text"] {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
}
/* Style for buttons */
input[type="submit"] {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<form action="login.php" method="post">
<label for="username">Username:</label><br>
<input type="text" id="username" name="username"><br><br>
<label for="password">Password:</label><br>
<input type="password" id="password" name="password"><br><br>
<input type="submit" value="Login">
</form>
</body>
</html>