I use the Bootstrap framework and have some problems with my header and modules. The title on my page is fixed, and when the modal file opens, it moves a few pixels to the right and goes back again when the modal closes.
An example is shown here: http://jsfiddle.net/D2RLR/7400/
I would like him to not move at all. I know this is caused by the scrollbar, so the container in the violin is set to 2000 pixels. Any ideas how I can solve this problem?
The code is as follows:
HTML
<div class="container"> <header> <nav id="menu" class="dl-menuwrapper"> <a href="#" class="menu-toggle dl-trigger"><i class="fa fa-reorder"></i></a> <ul class="dl-menu"> <li> <a href="#home" class="scroll"><i class="fa fa-home"></i>Home</a> </li> <li><a href="#profile" class="scroll"><i class="fa fa-user"></i>Profile</a></li> </ul> </nav> </header> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal </button>
CSS
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css'); .container { margin-top: 10px; } button { margin-top:100px; } .modal-content { height:500px; } header { width: 150px; margin:auto; left:0; right:0; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; text-align: center; position: fixed; background-color:rgba(0, 0, 0, 0.90); z-index: 2; }
source share