Footer alignment

Asked

Viewed 3,979 times

1

  • The only content on this page will be the banner?

  • No, there are the sliders in the middle and the problem is the footer that doesn’t line up according to the resolution of the page, the rest it lines up everything :(

  • SOLVED, I changed the size of the top image and solved. Thank you.

5 answers

1

This problem is due to footer placement in your index.php file. The footer is inside the ID #container

At the bottom of the page remove everything from line 144 to the end, which is from: (<div id="footer">) until (</html>) and paste the modified code into which I will refer below.

Current code:

<div id="footer">
        <br>
            <p> Suporte: <a href="mailto:[email protected]?subject=Suporte%20-%20SIG">Clique Aqui </a></p>
            <p>&copy; Peccin 2011 - 2014. Website Designed by <a href="mailto:[email protected]">TI - Peccin</a></p>
</div>

</div>
</body>
</html>

Modifies to:

</div> <!-- isto fecha a div #container antes de começar o #footer -->
    <div id="footer">
        <br>
            <p> Suporte: <a href="mailto:[email protected]?subject=Suporte%20-%20SIG">Clique Aqui </a></p>
            <p>&copy; Peccin 2011 - 2014. Website Designed by <a href="mailto:[email protected]">TI - Peccin</a></p>
    </div>
</body>
</html>

After this if you still want the footer to be centralized just make the changes in your file styles.css modifying to:

#footer {
    background-color: #010101;
    height: 80px;
    width: 1800px;
    position: relative;
    z-index: 999;
    margin-left: auto; /* linha modificada */
    margin-right: auto; /* linha adicionada */
}

1

Some script is creating one after closing the . a simple way would be to create a script to get to that object and delete it with css, see if this works:

<script>
$("object[type='application/gas-events-uni']").css({
overflow:'hidden',
display:'none'
})
</script>

-1

This is happening because the footer is set to static. Include this css in the footer:

.footer { position:Absolute; bottom:0; width:100%; }

  • Thanks friend, but did not give, he remained the same :(

  • Go to your file where the css is, look for your id that is #footer, change "position:relative" to "position:Absolute", also change "width:1800px" to "width:100%" and add another line like "bottom:0"

  • He lined up on the baseboard, beauty, but his side size is still smaller :( He aligns on the right arrow practically, there is a big white space

  • Then make the following changes: in the div footer you put the width: 100% and position: You do not need to include the bottom. In the paragraphs inside the div, you remove the margin-left, and change the text-align:left to text:align: center

  • I tried, but look how it turned out: https://www.dropbox.com/s/trhjicla3n5fzax/foto.PNG?dl=0

  • you have placed width: 100% in the div footer?

Show 1 more comment

-1

You can do what @Marcosperes suggested, or you can create code with jQuery to identify the user screen size and update the minimum height of your page content.

In your case you could do more or less like this:

function updtSize($) {
   var mheigth = $(window).height();  // Altura da janela
   mheight -= $("#header").outerHeight(true); // remove a altura do header
   mheight -= $("#nav").outerHeight(true); // remove a altura do menu
   mheight -= $("#footer").outerHeight(true); // remove a altura do footer
   mheight += $("#slides-container").height() - $("#slides-container").outerHeight(true); // remove as margens do footer

   $("#slides-container").css('min-height', mheight); // o mheight agora tem só a altura necessária para o footer encostar no bottom
}


jQuery(document).ready(function($) {
   updtSize($);
   $(window).resize(function(event) {
      updtSize($)
   });
});
  • Buddy, I don’t understand, I’d have to create a js with your code?

  • Try to put this script before closing the tag body.

  • Basically what this script does is put a minimum height that its tag slides-container have to have to tag footer touch the bottom of the page.

-1

Do the following :

div#slides-container {
height: 250px;
overflow: hidden;
width: 960px;
padding-top: 40px;
margin: auto;
}

Remove the div footer inside the container and do the following

<div id="w_footer>
 <div id="footer"></div>
</div>

in css do the following:

#w_footer{
 widht:100%;
 barckground-color:#010101;
}

#footer {
background-color: #010101;
height: 80px;
width: 85%;
margin: auto;
}
  • I tried your tip friend, look how it turned out... https://www.dropbox.com/s/bund1baekisnbae/foto2.PNG?dl=0

  • sorry there is an error, see the edition I made. The banner is already centered.

  • I did everything you told me friend, thanks for the help, but look at the image, it seems that has something "blocked" the footer, has no explanation... https://www.dropbox.com/s/j4hv9f68cg0ucrq/foto3.PNG?dl=0

  • Please put the html and css code in the question. I also think you should change the css and html topics, as this has nothing to do with php.

  • Sorry, I already took out PHP. About the codes I didn’t post because they were long, but ok, I will edit and post them here.

  • I checked the code and it is correct. There must be some error in the edition you made. Also remove the width of the footer p.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.