problem with a bootstrap footer 4

Asked

Viewed 84 times

0

Well I’m trying to make a footer, but I’m in trouble, when I zoom out it doesn’t end up at the end of the page like this: inserir a descrição da imagem aqui

how are: inserir a descrição da imagem aqui inserir a descrição da imagem aqui

html :

  <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>

css:

.xd{
    background-color:#000;
}
.xd p{
    color:#fff;
}

1 answer

2

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

See how it looks in the example using your code and just adjusting the position and the 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>

Browser other questions tagged

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