CSS Layout How to - Put div to right bottom corner








Question

We would like to know how to put div to right bottom corner.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.container {<!--from   www  .  ja va2 s . com-->
  position: absolute;
  background-color: gray;
  right: 50px;
  height: 200px;
  bottom: 50px;
}
</style>
</head>
<body>
  <div class="container">container</div>
</body>
</html>

The code above is rendered as follows: