Is there a more elegant way to position the div in such a way that it stays on the top right while scrolling down on all screens, without causing the layout to be messy on tablets and other devices? I am currently using Bootstrap. You can see a DEMO here.
<!DOCTYPE html>
<html lang="en" ng-app="ShopCartApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Starter Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<style type="text/css">
body {
padding-top: 50px;
}
.starter-template {
padding: 40px 15px;
text-align: center;
}
#divTotal{
background-color: green;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
<div class="radio">
<label><input type="radio" name="optradio">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio">Option 1</label>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
<div class="radio">
<label><input type="radio" name="optradio1">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio1">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio1">Option 1</label>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
<div class="radio">
<label><input type="radio" name="optradio2">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio2">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio2">Option 1</label>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
<div class="radio">
<label><input type="radio" name="optradio3">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio3">Option 1</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio3">Option 1</label>
</div>
</div>
</div>
</div>
<div style="position:fixed;top:20px;float:right;right:0px;" class="col-md-4">
<div class="panel panel-primary">
<div id="divTotal" class="panel-heading">
<h3 class="panel-title">Total</h3>
</div>
<div class="panel-body">
<h2>Total</h2>
</div>
</div>
</div>
</div><!-- /.row -->
</div><!-- /.container -->
<script type="text/javascript" src="angular.js"></script>
</body>
</html>