Bonjour,
Je voulais savoir pourquoi on peut définir une hauteur d'un paragraphe en "em" alors qu'en specifiant une valeur en pourcentage ca ne marche pas.
merci
| CODE |
| html, body{ height:100%; } |
| CODE |
<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <link rel="stylesheet" href="css/index.css" /> </head> <body> <div id="conteneur"> <div id="header"> <div id="identification"> <form action="index.php?sousmenu=identification" method="post"> <p> <label for="login"> Identifiant : </label> <input type="password" name="login" value="" maxlength="10" id="login" /> </p> <p> <label for="pass"> Mot de passe : </label> <input type="password" name="pass" value="" maxlength="10" id="pass" /> <input type="submit" name="submit_identification" value="connexion" id="submit" /> </p> </form> </div> <div id="menu"> </div> <div id="contenu"> </div> </div> </body> </html> |
| CODE |
html, body { margin: 0; padding: 0; height: 100%; font-family: Geneva, Arial, sans-serif; color: #000000; } #conteneur { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } #header { position: absolute; top: 0; left: 0; width: 100%; height: 10%; } #identification { float: right; width: 40%; height: 100%; } #identification p // j'ai essayé #header p aussi { height: 50%; // j'ai essayé 49% comme tu avais dis ca change rien } #menu { position: absolute; top: 10%; left: 0; width: 15%; height: 90%; } #contenu { position: absolute; top: 10%; left: 15%; width: 85%; height: 90%; overflow: auto; } |