I know this is simple, yet I can't figure it out because I don't know CSS. I tried a few google options but it won't work. What I want to do is put a pair of buttons in the center of the browser (vertically and horizontally). I tried putting the pair of buttons in a div
tag but anytime i did that, the buttons disappeared. My idea was to put the buttons in a div
tag and center that div on the screen. Any ideas how to work this out. Got a fiddle here: https://jsfiddle.net/um7ctpnj/1/
$(document).ready(function (){
$('#show').click(function(){
$( "div:hidden:first" ).fadeIn( "slow" );
});
$('#hide').click(function(){
$( "div" ).fadeOut("fast");
});
});
div {
margin: 3px;
width: 80px;
display: none;
height: 80px;
float: left;
}
#one {
background: #f00;
}
#two {
background: #0f0;
}
#three {
background: #00f;
}
<!doctype html>
<title>Button Show</title>
<body>
<body>
<button id="show" type="button" class="btn btn-primary">Click Me!</button>
<button id="hide" type="button" class="btn btn-primary">Hide Me Now!</button>
<div id="one">1</div>
<div id="two">2</div>
<div id="three">3</div>
<script src="javascript.js"></script>
</body>
</html>