samedi 26 novembre 2022

Check Box isn't Displaying

I can't get the checkbox to work correctly I'm trying to make a newsletter subscribe area but the checkbox isn't displaying and the text-"daily newsletter" is moved over, please help my code is:

form {
  border: 4px solid #f1f1f1;
  padding-bottom: 30px;
}

.containerSub {
  padding: 20px;
  background-color: #f1f1f1;
}

input[type=text],
input[type=submit] {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

input[type=checkbox] {
  margin-top: 16px;
}

input[type=submit] {
  background-color: #04AA6D;
  color: white;
  border: none;
}

input[type=submit]:hover {
  opacity: 0.8;
}
<form action="Subsc.php" method="post">
  <div class="containerSub">
    <h2>Subscribe to our Newsletter</h2>
    <p>If you liked this article consider subscribing to our Newsletter to receive our recent articles directly from your email</p>
  </div>

  <div class="containerSub" style="background-color:white">
    <input type="text" placeholder="Name" name="name" required>
    <input type="text" placeholder="Email address" name="email" required>
    <label>
            <input type="checkbox" checked="checked" name="subscribe"> Daily Newsletter
         </label>
  </div>

  <div class="containerSub">
    <input type="submit" value="Subscribe">
  </div>
</form>

Output

enter image description here




Aucun commentaire:

Enregistrer un commentaire