I am building a scorecard
where I will have overall score depicted inside a circle in the middle of a screen while the details would be in the next row.
I am using bootstrap 3 and here is my code below
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<title>Utora Scorecard</title>
<style>
.circle {
height: 150px;
width: 150px;
display: table-cell;
text-align: center;
vertical-align: middle;
border-radius: 50%;
font-weight: 10px;
border-width: 3px;
border-style: solid;
border-color: red;
font-size: 30px;
margin-left: 200%;
}
</style>
</head>
<body>
<div class="container">
<div class="circle">
57
</div>
<div class="row">
<div class='col-lg-2 col-sm-3'>
<!-- details of the score card will go in each of the columns -->
</div>
<div class="col-lg-2 col-sm-3">
</div>
<div class="col-lg-2 col-sm-3">
</div>
<div class="col-lg-2 col-sm-3">
</div>
<div class="col-lg-2 col-sm-3">
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>
Here is how it looks in the browser
Now I want this circle to be in middle of the screen but unable to do it.
I tried using text-center
, center-block
, margin-left
etc on the div
but nothing worked. How can I center the circle such that even though the browser size changes, it remains in the center?