Partage
  • Partager sur Facebook
  • Partager sur Twitter

Problème de fusion des marges ?

Sujet résolu
    5 juin 2018 à 10:50:40

    Bonjour à tous

    voilà j'ai un autre problème que je n'avais pas avant, mon header n'est pas collé au top de la page alors qu'il n'y a aucune raison pour qu'il soit comme ça, le header reste sur toute la page sans aucune raison, voilà un screen :

    J'ai lu comme quoi il était possible que ce soit un problème de fusion des marges mais même avec ça je n'ai pas réussi a régler le problème, quelqu'un aurait une solution ? je passe en dessous les codes html et css :

    <html>
    
    <head>
    	<title>Livre de Police</title>
    	<meta charset="UTF-8">
    	<meta name="viewport" content="initial-scale=1.0">
    	<link rel="stylesheet" href="./../css/style.css">
    	<link rel="stylesheet" href="https://d1azc1qln24ryf.cloudfront.net/114779/Socicon/style-cf.css?c2sn1i">
    </head>
      <body>
    
    <header>
            <a href="index.php"><img id='logo' src="./../img/loo.png" alt="Logo" /></a>
            <p id="burger" class="burger"></p>
            <h1>Livre de police</h1>
            <nav>
                <ul>
                    <li><a href="index.php">Accueil</a></li><li><a href="recherche.php">Rechercher</a></li><li><a href="repriseachat.php">Reprise ou Achat</a></li><li><a href="vente.php">Vente</a></li>
                </ul>
            </nav>
    </header>
    <section id="test">
    <div id="gauche">
    <fieldset>
    <legend><p class="legend1">Reprise ou Achat</p></legend>
    <h1>Déclarer une reprise ou achat</h1>
     
    <FORM ACTION="./traitement/insert.php" METHOD="POST">
            <!-- Origine VN/VO/ACHAT/VD : <INPUT TYPE="TEXT" NAME="origine"><br /><br /> -->
            <label for="origine">Origine VN/VO/ACHAT/VD : </label><SELECT TYPE="TEXT" NAME="origine" SIZE=1 id="origine"><OPTION>VN<OPTION>VO<OPTION>ACHAT<OPTION>VD</SELECT><br /><br />
            <label for="conduc">Conducteur : </label><INPUT TYPE="TEXT" NAME="conducteur" id="conduc"><br /><br />
            <label for="dateentr">Date d'entrée : </label><INPUT TYPE="TEXT" NAME="date_entree" id="dateentr"><br /><br />
            <!-- Numéro Stock : <INPUT TYPE="TEXT" NAME="numero_stock"><br /><br />-->
            <label for="nompnom">Nom-Prenom-Profession-adresse de l'ex propriétaire : </label><TEXTAREA NAME="nom_prenom_prof_add_ex_proprio" id="nompnom" rows=2 cols=30></TEXTAREA><br /><br /><br />
            <label for="nature">Nature et n° pièce d'identité : </label><INPUT TYPE="TEXT" NAME="nature_p_ident" id="nature"><br /><br />
            <label for="mode">Mode De Paiement Par La Concession PELRAS : </label><INPUT TYPE="TEXT" NAME="mode_paiement_bmw" id="mode"><br /><br /><br /><br />
            <label for="marque">Marque : </label><INPUT TYPE="TEXT" NAME="marque" id="marque"><br /><br />
            <label for="modele">Modèle : </label><INPUT TYPE="TEXT" NAME="modele" id="modele"><br /><br />
            <label for="couleur">Couleurs-Options : </label><INPUT TYPE="TEXT" NAME="couleurs_options" id="couleur"><br /><br />
            <label for="datemec">Date 1ere Mise En Circulation : </label><INPUT TYPE="TEXT" NAME="date_1_mes" id="datemec"><br /><br />
            <label for="chassis">Châssis : </label><INPUT TYPE="TEXT" NAME="chassis" id="chassis"><br /><br />
            <label for="immat">Immatriculation : </label><INPUT TYPE="TEXT" NAME="immatriculation" id="immat"><br /><br />
            <label for="km">Kilométrage : </label><INPUT TYPE="TEXT" NAME="kilometrage" id="km"><br /><br />
            <!-- Argus-Achat : <INPUT TYPE="TEXT" NAME="argus_achat"><br /><br /> -->
            <label for="pxachat">Prix d'achat : </label><INPUT TYPE="TEXT" NAME="prix_achat" id="pxachat"><br /><br />
            <INPUT TYPE="SUBMIT" VALUE="INSERER">
    </FORM>
    </fieldset>
    </div>
    </section>
    
    <footer>
        <p id="copyright">© Lucas Baylon</p>
        <p id="copyright">Tous Droits Réservés</p>
    </footer>
    
    </body>
    
    </html>

     et css :

     {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        transition-duration: 0.25s;
        transition-timing-function: ease-in-out;
        font-family: sans-serif;
    }
    
    main {
        padding-top: 75px;
        width: 100%;
        height: auto;
        background-color: #e6e6e6;
    }
    
    body{
        margin:0px;
    }
    
    footer {
        background-color: white;
        color: #3F51B5;
        text-align: center;
        height: 85px;
        clear: both;
        padding: 20px 0 20px 0;
        box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.2);
    }
    
    footer ul {
        width: 300px;
        font-size: 1.4em;
        list-style: none;
        margin: auto;
        margin-bottom: 5px;
    }
    
    footer li {
        display: inline-block;
        width: 40px;
        margin-top: 10px;
    }
    
    footer ul li i {
        color: #3F51B5;
    }
    
    footer ul li a {
        text-decoration: none;
    }
    
    footer ul li i:active {
        font-size: 0.8em;
    }
    
    header {
        width: 100%;
        height: 75px;
        padding: 0px 10px 0px 10px;
        background-color: white;
        position: fixed;
        margin-bottom: 75px;
        z-index: 1;
        box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.2);
    }
    
    header h1 {
        display: inline-block;
        padding-top: 20px;
        font-weight: 500;
        color: #3F51B5;
        margin-left: 10px;
    }
    
    #contact-page {
        text-align: center;
        background: white;
        color: #303030;
        margin-top: 20px;
        padding-bottom: 20px;
        background-color: transparent;
    }
    
    .form {
        padding: 7px;
        margin-top: 15px;
    }
    
    .Bouton-Valider {
        padding: 7px 12px;
        background-color: darkorange;
        border-radius: 5px;
        color: #FAFAFA;
        cursor: pointer;
        font-size: 0.9em;
        margin-top: 5px;
    }
    
    #intro {
        margin-top: 15px;
    }
    
    header nav ul a {
        display: block;
        padding: 10px;
        color: #3F51B5;
        text-decoration: none;
    }
    
    header p.burger {
        position: fixed;
        right: 0px;
        top: 0px;
        height: 50px;
        width: 50px;
        z-index: 2;
        line-height: 1;
        font-size: 3rem;
        color: #3F51B5;
        margin-top: 13px;
        margin-right: 12px;
    }
    
    header p.burger::before {
        content: '\2630';
    }
    
    header label::before {
        content: '\2630';
        line-height: 1;
        font-size: 3rem;
    }
    
    header p.burgerchecked::before {
        content: '\2716';
    }
    
    #map_canvas {
        height: 400px;
        width: 100%;
    }
    
    main article {
        padding: 0px 20px 0px 20px;
        background-color: whitesmoke;
        color: #303030;
        height: auto;
        display: inline-block;
        text-align: center;
        font-size: 1.1em;
        margin-left: 15px;
        margin-right: 15px;
    }
    
    main article p {
        margin-bottom: 15px;
    }
    
    article h3 {
        margin-top: 10px;
    }
    
    main article p a {
        display: block;
        background-color: darkorange;
        line-height: 20px;
        padding: 15px;
        color: #303030;
        width: 100%;
        text-decoration: none;
    }
    
    main article a:hover {
        box-shadow: 3px 3px darkgrey;
    }
    
    #sec_article {
        padding: 20px;
        text-align: center;
        background-color: white;
        width: 100%;
    }
    
    #test{
        margin: auto;
        margin-top: 50px;
        margin-bottom: 50px;
        padding-top: 50px;
        padding-bottom: 50px;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 0 0 20px #555;
        -webkit-box-shadow: 0 0 20px #555;
        box-shadow: 0 0 150px #555;
        width:90%;
        text-align: center;
    }
     
    #test fieldset{
        margin-bottom:0px;
        margin-left:16px;
        margin-right: 16px;
        border:2px solid;
        -moz-border-radius:8px;
        -webkit-border-radius:8px; 
        border-radius:8px;
    }
     
    #test p .legend1 {
        margin: auto;
        width: 100%;
        display: block;
        background-color: #9DADC6;
    }
     
    #test p{
        margin:0;
        padding:5px;
        font-size:1.5em;
        color:#fff;
        background-color:#9DADC6;
        border:1px solid #8E98A4;
        border-bottom:0;
        -webkit-border-radius: 10px 10px 0 0;
        -moz-border-radius: 10px 10px 0 0;
        border-radius: 10px 10px 0 0;
    }
     
    #test form {
        background-color:#e5e5e5;
        padding:5px;
        margin:0;
        border:1px solid #fff;
        border-top:0;
        -webkit-border-radius: 0 0 10px 10px;
        -moz-border-radius: 0 0 10px 10px;
        border-radius: 0 0 10px 10px;
    }
     
    div#gauche form{
        padding-left: 50px;
    }
     
    label {
        display: block;
        width: 150px;
        float: left;
    }
    
    #photo,
    #ballon,
    #dialogue {
        width: 100px;
    }
    
    #h2news{
        color: #303030;
    }




    • Partager sur Facebook
    • Partager sur Twitter
      5 juin 2018 à 10:54:46

      Voilà l'erreur dans ton code css dans header :

      positionfixed;

      • Partager sur Facebook
      • Partager sur Twitter

      Plus je fais d'erreurs, plus j'apprends ! Bon, faut quand même faire attention à ce que l'erreur ne soit pas trop grosse ! 😅

        5 juin 2018 à 11:02:03

        N.Parvedy a écrit:

        Voilà l'erreur dans ton code css dans header :

        positionfixed;


        ok très bien... c'est bizarre car avant, même avec le position: fixed; je n'avais pas ce problème, m'enfin bon, c'est réglé, Merci ! :)
        • Partager sur Facebook
        • Partager sur Twitter

        Problème de fusion des marges ?

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown