<html>
<head>
  <title>Div example</title>
</head>
<body>

<style type="text/css"> 
.right {
  float: right;
  width: 120px;
  padding: 10px;
  border: 1px solid;
  clear: right;
}
</style>

<div class="right">
  1
</div>

<div class="right">
  2
</div>

</body>
</html>