Background image html

Bonjour,

svp comment en fait d'une image le background d'un formulaire en html ?

3 réponses

  1. Dans le cas présent, l'image fond.jpg se trouve dans un dossier qui se nomme img.

    background:url(img/fond.jpg)
    1. Par exemple:


      <!doctype html>
      <html>
      <head>
      <meta charset="utf-8">
      <title>Document sans nom</title>
      <style>
      fieldset {
      width:200px;
      border-radius:5px;
      padding:20px 50px 50px 50px;
      margin:20px 0 0 0 ;
      background:url(img/fond.jpg)
      }
      input[type=text] {
      background:lemonchiffon;
      }
      label {
      display:block;
      }
      </style>
      </head>

      <body>
      <fieldset>
      <form name="form1" method="post" action="">
      <p>
      <label for="nom">Nom</label>
      <input type="text" name="nom" id="nom">
      </p>
      <p>
      <label for="prenom">Prénom</label>
      <input type="text" name="prenom" id="prenom">
      </p>
      <p>
      <label for="ville">Ville</label>
      <input type="text" name="ville" id="ville">
      </p>
      <p>
      <input type="submit" name="envoi" id="envoi" value="Envoyer">
      </p>
      </form>
      <p></p>

      </fieldset>
      </body>
      </html>


      http://www.tutoriels-extensions-dreamweaver.fr/