12
SEANCE sous le capot du web </> part II

Cours Code Part 2

Embed Size (px)

Citation preview

SEANCE

sous le capot du web

</>

part II

backgroundimage

paragrapheformulaire

doctype

Step 1 : Changer les meta données

<head>

<title>Hotspotter - Mobile hotspots for travelers</title>

<meta name="description" content="Home Everywhere - Stay online while travelling">

<meta name="keywords" content="hotspotter dongle tourists paris">

</head>

Step 2 : Centrage de la div

body, html, #wrapper { width: 100%; height: 100%; } #wrapper { display: table; }

#main { display: table-cell; vertical-align: middle; }

<body> <div id="wrapper"> <div id="main"> <div id="contenu"> </div> </div></div>

</body>

Style

contenu centré verticalement

Solution retenue

centrage horizontal : margin: 0 auto;outext-align: center;

Step 3 : Fonctionnement du mail

Solution “simple”

fonction mail() doc > php.net/mail

<form method="post" action="email.php"> <input type="text" name="message" placeholder="Mail" /><br /> <textarea style="display: none;" name="subject" placeholder="Message">Vous avez un nouvel inscrit</textarea> <input type="submit"> </form>

<?php mail('maildereception', $_POST['subject'], $_POST['message']);?><p>Your email has been sent.</p>élement affiché

après envoi du mail

Et voilà, vous venez presque de coder une page launchrock par vos propres moyens !