Jump to content

Footer won't stay at bottom and won't go the full length of page

cakez
Go to solution Solved by cakez,
3 minutes ago, tatte said:

You have set the max-width of .container to 1000px, that should be pretty self-explanatory.

 

Floating half of your elements breaks their natural order, this could be fixable by using clear, but basically a complete redesign would be much easier. I'm assuming you used a program to create this, which would explain what caused this level of mess in the first place.

 

TL;DR max-width explains why it's not full width, careless use of float probably explains why it's not the last element shown.

 

I used the skeleton boilerplate

and I fixed it

footer {
   position:fixed;
   left:0px;
   bottom:0px;
   width:100%;
}

 

Hi, I'm coding my website, and for my footer I set it to be blue. But the footer isn't at the bottom of the page, or go the full width of the page.Can anyone help me fix it?

BTW I'm using the skeleton boilerplate

 

HTML

<footer class="main_nav blue">
        <div class="container">
            <div class="row twelve columns"></div> 
            <div class="row twelve columns offset-by-three">
                <p>Copyright &copy; 2017 . All Rights Reserved.</p>
            </div>
        </div>
    </footer>

CSS

.main_nav{
    padding: 1% 0;
    display: block;
    
}

.blue {
    background-color: #76bfd7;
}

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

set the width to 100%

try to adjust the padding as needed - i don't really do frontend so there probably is a more efficient way to do this,

 

also, make sure ur footer code is at the end of ur html - and you are overcomplicating things, just one or 2 divs  would be fine - no need to use a footer tag

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know much about HTML but add this:

.main_nav{
     width: 100%;
     position: fixed;

}

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, SCGazelle said:

I don't know much about HTML but add this:


.main_nav{
     width: 100%;
     position: fixed;

}

 

 

position fixed messes up the whole thing, and width: 100%; doesn't do anything

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, gtx1060=value said:

set the width to 100%

try to adjust the padding as needed - i don't really do frontend so there probably is a more efficient way to do this,

 

also, make sure ur footer code is at the end of ur html - and you are overcomplicating things, just one or 2 divs  would be fine - no need to use a footer tag

 

width to 100% didn't do anything

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, cakez said:

position fixed messes up the whole thing, and width: 100%; doesn't do anything

ok. I don't know much about HTML so that's the only help I can give

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, SCGazelle said:

ok. I don't know much about HTML so that's the only help I can give

k, thank for response though.

Link to comment
Share on other sites

Link to post
Share on other sites

Post the whole code (use pastebin), we can't help you when you don't even give us the CSS for all the classes involved.

 

Footer should display as a block by default, so that's unnecessary. 

Link to comment
Share on other sites

Link to post
Share on other sites

32 minutes ago, tatte said:

Post the whole code (use pastebin), we can't help you when you don't even give us the CSS for all the classes involved.

 

Footer should display as a block by default, so that's unnecessary. 

 

css:

Html:

Link to comment
Share on other sites

Link to post
Share on other sites

So that uses five separate stylesheets and you still only posted one. I'm done.

 

Since Footer is inside a div.container, it's a good bet the .container is your problem.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, tatte said:

So that uses five separate stylesheets and you still only posted one. I'm done.

 

Since Footer is inside a div.container, it's a good bet the .container is your problem.

 

Do you want the other css?

normalize

skeleton

font-awesome

font stylesheet

and I set 

.container{
    width: 100%;
    bottom: 0;

and it still doesn't fix it.

Link to comment
Share on other sites

Link to post
Share on other sites

You have set the max-width of .container to 1000px, that should be pretty self-explanatory.

 

Floating half of your elements breaks their natural order, this could be fixable by using clear, but basically a complete redesign would be much easier. I'm assuming you used a program to create this, which would explain what caused this level of mess in the first place.

 

TL;DR max-width explains why it's not full width, careless use of float probably explains why it's not the last element shown.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, tatte said:

You have set the max-width of .container to 1000px, that should be pretty self-explanatory.

 

Floating half of your elements breaks their natural order, this could be fixable by using clear, but basically a complete redesign would be much easier. I'm assuming you used a program to create this, which would explain what caused this level of mess in the first place.

 

TL;DR max-width explains why it's not full width, careless use of float probably explains why it's not the last element shown.

 

I used the skeleton boilerplate

and I fixed it

footer {
   position:fixed;
   left:0px;
   bottom:0px;
   width:100%;
}

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×