Jump to content

Keeping a Footer on the Bottom - Issue with W3Schools Sample Code


AARRGGHHH

Recommended Posts

What issues are you having in regards to it? I need something a bit more specific.

Is it the webpage doesn't reach the bottom of the browser in some resolutions? That's fixable.

Is it layout issues, and has nowhere for it to fit? That's fixable.

 

Link to comment
Share on other sites

18 hours ago, dsonesuk said:

https://www.w3schools.com/code/tryit.asp?filename=FVLGIE5M0TM4

The footer remains at bottom until content extends beyond that of the footer, then it will remain at bottom of content.

i tried something like the code u sent... (my footer has a certain width of 60px for example.

i want it right in the middle and in the footer:

<div class="down">
	<div class="downcenter"> footer
    </div>
</div>

<style>
  .down{

}
.downcenter{
	bottom: 0;
	position: absolute;
	display: block;
  background-color: rgba(0,0,0,.5);
  color:#fdfdfd;
  width: 100px;
  height:20px;
   margin-left: auto;
   margin-right: auto;

}
</style>

but it wont work it goes to the left and stick there!

i even tried this but it is in left corner and wont move to center:

.down{
bottom: 0;

    position: absolute;
	height: 20px;
    width: 200px;
	margin:0 auto;
}
.downcenter{
	display: block;
  background-color: rgba(0,0,0,.5);
  color:#fdfdfd;
  width:100%;

}

 

Link to comment
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
×
×
  • Create New...