The main page of an html and css learning project has 3 columns using the bootstrap 3 classes. The first contains a text and a button to copy this text to the clipboard. The second and third have a link.
I tried to configure with the codes below.
Here is a fiddle: https://jsfiddle.net/buhvm3o8/4/
html code:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row-fluid">
<div class="col-md-4">
<div id="select_txt" class="alert alert-success">
<strong>some text do copy</strong>
<button class="btn btn-secondary btn-sm" type="button" onclick="copy_data(select_txt)" style="float: right;">
<i class="glyphicon glyphicon-copy"></i>copy</button>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-success">
<a href="#">site1</a>
</div>
</div>
<div class="col-md-4">
<div class="alert alert-success">
<a href="#">site2</a>
</div>
</div>
</div>
</div>
css code:
body {
font-family: "roboto", monospace;
height: 100%;
}
.alert-success {
width: 100%;
min-height: 100%;
text-align: center;
}
My questions are:
- How can I set the "col-md-4" correctly so that it is as a column, because as shown in the image below, it is as a row.
- How can I set the "col-md-4" to the screen height of anyone looking at it.