Problem with include positioning.php

I'm having a problem with the footer placement I did with include.php.

I created a file include.php, for now the only thing that has in it is a box from where the footer will be, as I am still testing.

I'm calling it at the end of each page, always before body.

<?php include "rodape.php"; ?> 

The problem is that in only one of the pages it is positioned at the end, in the others it appears in different places, at the top, further down a little, and in others it he doesn't even show up.

Would someone know how to tell me what it can be, if I need an excerpt of the code I can put here.

-- > the html of one of the pages that is giving the problem:

<!DOCTYPE HTML>
<html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <Title>Portfolio - Julio Cesar </title>

    <link href="style.css" rel="stylesheet" type="text/css" />

    <link href='http://fonts.googleapis.com/css?family=Lato:400,700,900,300,100' rel='stylesheet' type='text/css'>

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:700,400' rel='stylesheet' type='text/css'>

    <!--
    <script type="text/javascript" src="javaScript.js"></script>
    -->
</head>
<body>

    <div class="Conteiner"> <!--- INICIO CONTEINER-->   

    <header>    

        <div class="meu_logo">
            <a href="Index.php">Julio Cesar</a>
        </div>  

        <div id="caixatopo"></div>  


        <nav class="menu">
        <ul>
            <li><a href="projetos.php">Projetos</a></li>
            <li><a href="Process.php">Processo</a></li>
            <li><a href="About.php">Sobre</a></li>
            <li><a href="Contact.php">Contato</a></li>
        </ul>
        </nav>

    </header>   

        <div class="titulo_proclinica">
            <p>FATOR CLEAN <p>
        </div>


        <div class="categoria_fclean">
            <p>Web Design<p>
        </div>

        <div class="fator_imac1">
            <img src="imagens/fator_celan/fator imac1.png" />
        </div>  

        <div class="fator_imac2">
            <img src="imagens/fator_celan/fator imac2.png" />
        </div>  

        <div class="boxmarrom_1"></div>

        <div class="icones">
            <img src="imagens/fator_celan/icones.png" width="960px"  height:"auto"/>
        </div>

        <div class="fator_imac3">
            <img src="imagens/fator_celan/fator imac3.png" />
        </div>
    </div> <!--- FIM CONTEINER-->


    <?php include 'rodape.php'; ?>
</body>  

The file code includes:

<div class="box_rodape"></div>

The CSS of the site is great, I don't know if I could put it here.

-- > footer CSS, which is the div class box_rodape:

.box_rodape {
     background-color: rgb( 250, 31, 32 );
     left: 0;
     width: 960px;
     height: 300px;
     z-index:9999;   
}
Author: Avelino, 2015-04-04

1 answers

The CSS you posted does not say if the box has relative or absolute position or any other.

Z-index it only works if a position is declared. And if it is position: absolute it must be relative to its parent which must have a position: relative.

If body is your relative you can try 2 things:

  1. one is to give a height: 100% in body
  2. the other, most recommended, is you use a technique called Stick-Footer. Play this on Google you will learn quick.
 1
Author: dsantoro, 2015-05-05 14:22:14