Se connecter avec
S'enregistrer | Connectez-vous

Decalage d'un DIV

Dernière réponse : dans Programmation

bonjours

je fait un site, cependant lorsque je met du contenu dans mes div, notament la TAG h1 ou input
mon div, se déplace d'environ 20px vers le bas,
je ne trouve pas d'où peut venir l'erreur

je vous donne un condenser de ce que je fait.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
  2. <html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
  5. <title>Immobilier</title>
  6. <link href="css/global.css" rel="stylesheet" type="text/css" />
  7. <script type="text/javascript" src="js/jQuery.js"></script>
  8. <script type="text/javascript" src="js/control_formulaire.js"></script>
  9. </head>
  10. <body>
  11. <div id="mise-en-page">
  12. <div id="header">
  13. <div id="gauche-pour-les-pub"></div>
  14. <div id="pub-google"></div>
  15. <div id="droite-pour-les-pub"></div>
  16. </div>
  17. <div id="page-central">
  18. <div id="arondi-cadre-haut-page-central"></div>
  19. <!-- ERREUR SUR LE ID CONNECTION, LE DIV SE DÉPLACE -->
  20. <div id="connection"><h1> connection + a et input nom + MDP</h1></div>
  21. <div id="stat-bien-immo"><h1>Statiqtique sur les bien immo</h1></div>
  22. <div id="flash-bien-immo"><h1>diaporama fla</h1></div>
  23. </div>
  24. </div>
  25. </div>
  26. </body>
  27. </html>


et le css
  1. /* Choix des couleurs
  2. baclgroung = #FFFFFF
  3. color: #990000
  4.  
  5. */
  6. /* Parametre par default */
  7. body {
  8. margin: 0;
  9. padding: 0;
  10. background-image: url(../img/mep/blackgroung.gif);
  11. background-repeat: repeat-x;
  12. }
  13.  
  14. #mise-en-page {
  15. width: 980px;
  16. height: auto;
  17. margin-right: auto;
  18. margin-left: auto;
  19. }
  20. /* mise en place de l'espace publicité*/
  21. #header{
  22. height: 120px;
  23. margin-bottom: 35px;
  24. }
  25. #gauche-pour-les-pub
  26. {
  27. background-image: url(../img/mep/gauche-pour-les-publicite.gif);
  28. background-repeat: no-repeat;
  29. height: 120px;
  30. width: 10px;
  31. float: left;
  32. }
  33. #droite-pour-les-pub{
  34. background-image: url(../img/mep/droite-pour-les-publicite.gif);
  35. background-repeat: no-repeat;
  36. height: 120px;
  37. width: 10px;
  38. float: left;
  39. }
  40. #pub-google{
  41. height: 120px;
  42. float: left;
  43. width: 960px;
  44. background-color: #000000;
  45. }
  46. /* mise en place du cadre principal*/
  47. #page-central
  48. {
  49. }
  50. #arondi-cadre-haut-page-central
  51. {
  52. background-image: url(../img/mep/Haut-cadre.gif);
  53. height: 10px;
  54. }
  55. #connection
  56. {
  57. height: 24px;
  58. background-color: #000000;
  59. }
  60. #stat-bien-immo{
  61. width: 400px;
  62. float: left;
  63. height: 311px;
  64. }
  65. #flash-bien-immo{
  66. float: left;
  67. height: 311px;
  68. width: 580px;
  69. }
  70. /* Redifinition des H1 a H6*/
  71. h1{
  72. color: #990000;
  73. }

Autres pages sur : decalage div

Lassé par la pub ? Créez un compte
Lassé par la pub ? Créez un compte
Tom's guide dans le monde