Reputation:
I'm trying to align this 4 elements and they are not correctly aligned. I'm using bootstrap.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<div class="container" <div class="row">
<h3>Environments</h3>
<div class="well">
<div class="row">
<div class="col-md-3">
<h5>sadsadsaf</h5>
</div>
<div class="col-md-3">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:72">72%</div>
</div>
</div>
<div class="col-md-3">
<div class="checkbox">
<input type="checkbox" checked data-toggle="toggle" data-size="mini">
</div>
</div>
<div class="col-md-3">
<button class="btn-danger">Delete</button>
</div>
</div>
</div>
</div>
</div>
How can I fix this? Also, I've added the delete button based on the amount of names in the database. When I press the Delete button how do I know what's the name associated with the delete button?
Upvotes: 0
Views: 91
Reputation: 976
add those at col-md-3 or set an another class
display: inline-block;
vertical-align: middle;
float: none;
and then set width
Upvotes: 0
Reputation: 141
Try playing with the margins on your elements, as they have varying margin-top/bottom which is giving you alignment trouble.
Upvotes: 1