Harvey Harvey - 6 months ago 52
HTML Question

Bootstrap How to add a button to the top-left corner of a jumbotron?

Is it possible to place the button inside the jumbotron in the top-left-most corner rather than just above it?

Currently I have:

<a href="#menu-toggle" class="btn btn-default" id="menu-toggle">
<span class="glyphicon glyphicon-th-list"></span>
</a>
<div class="jumbotron">
<div class="container">
<div class="page-header text-center">
<h1>Title of Page</h1>
</div>
</div>
</div>
</div>


The button creates a noticable bar above the jumbotron (which looks like a rubbish navbar!)

How can I place the button in the top-left-most corner to eliminate this problem?

Answer

Here you go. Just add absolute positioning to the button and put it INSIDE your jumbotron, not above it.

#buttonmenu {position:absolute; top:5px; left:5px;}

http://www.bootply.com/uM3TkcMlT7