CSS gradient does not take up the full height of the screen

0

I have this problem: you see a part without gradient at the bottom of my screen. I do not know how to remove it, I tried it with margin but it leaves it ugly when I pass it to tablet-phone view. Can you help me?

This is my HTML code (to see the error you have to click on the "Full Page" button):

body 
{
  background: -webkit-linear-gradient(#D10000,black);
  background: -o-linear-gradient(#D10000,black);
  background: -moz-linear-gradient(#D10000,black);
  background: linear-gradient(#D10000,black);
}

.contrast-color
{
  color: #FFFFFF;
  text-shadow: 4px 4px black;
}

.mih1 { font-size: 40px;
  color: white; }

.myh1 { font-size: 40px;
  color: black; }

.mybutton
{
  color: black;
  border: 2px solid #D10000x|;
  padding: 70px 30px;
  text-decoration: none;
  display: inline-block;
  font-size: 50px;
  margin: 2px 2px;
  cursor: pointer;
  background-color: white;
  -webkit-transition-duration:0.5s;
  transition-duration:0.5s
}

.mybutton:hover
{
  background-color: #D10000;
  color: black;
  -webkit-transition-duration:0.5s;
  transition-duration:0.5s
}
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Alta de calificaciones online</a>
    </div>

    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#">Mis datos</a></li>
        <li><a href="#">Cambiar contraseña</a></li>
        <li><a href="#">Salir</a></li>
      </ul>
    </div>
  </div>
</nav>

<div class="container">
  <div class="row">
    <div class="col-sm-3 col-md-4 col-lg-6 col-sm-offset-2 col-md-offset-2 col-lg-offset-3">
      <h1 class="text-center mih1">Bienvenido</h1>
      <h1 class="text-center myh1"> Daniel <small>Becerril López</small></h1><br>
      <button class="mybutton">Asentar calificaciones</button>
    </div>
  </div>
</div>

This is the image that is jumping me:

    
asked by Alberto Siurob 02.09.2016 в 03:13
source

1 answer

2

Try configuring your CSS and adding the following things:

html, body {
    height:100%;
}

And ready, everything will be as you wish it:)

html, body{
  height:100%;
 }

body {
   background: -webkit-linear-gradient(#D10000,black);
   background: -o-linear-gradient(#D10000,black);
   background: -moz-linear-gradient(#D10000,black);
   background: linear-gradient(#D10000,black);
   margin:0px !important;
 }

Any questions, comment on it! I will gladly help you, greetings! : D

    
answered by 02.09.2016 / 03:51
source