problem with a bootstrap footer 4

1

Well I'm trying to make a footer, but I have a problem, when I zoom out it does not stay at the bottom of the page like this:

Howareyou:

html:

<divclass="container-fluid pt-4 pb-1 xd">
   <p class="text-left">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
  </div>

css:

.xd{
    background-color:#000;
}
.xd p{
    color:#fff;
}
    
asked by anonymous 29.10.2018 / 22:50

1 answer

2

Gabriel will depend a lot on your project, but basically you need to position:absolute and bottom:0 in your div . There are other ways to do this, but you have to see the one that looks best for your project as I said ...

See how you get in the example using your code and just setting position and bottom

body {
  background-image: url(https://unsplash.it/400/300);
  background-size: cover;
}
.xd{
   background-color:#000;
   position: absolute;
   bottom: 0;
}
.xd p{
   color:#fff;
}
  <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />

<div class="container-fluid pt-4 pb-1 xd">
  <p class="text-left">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
  </p>
</div>
    
30.10.2018 / 00:23