Bootstrap full screen modal right side error - css

Was trying bootstrap full screen modal. I can see the modal but there is space on the right hand side. It is not expanding the whole screen. The same code works when run individually as show in this link: https://mdbootstrap.com/snippets/jquery/mustafaozkaya/789907?action=fullscreen .
But when i integrate with my actual code this mess is created. Check image how the modal look with bootstrap and css code.
Please see below image:
Check the highlighted area.
Below is the code:
.modal-dialog-full-width {
width: 100% !important;
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
max-width:none !important;
}
.modal-content-full-width {
height: auto !important;
min-height: 100% !important;
border-radius: 0 !important;
background-color: #ffffff !important
}
.modal-header-full-width {
border-bottom: 1px solid #9ea2a2 !important;
}
.modal-footer-full-width {
border-top: 1px solid #9ea2a2 !important;
}
.row > div {
padding: 0 5px !important;
}
img {
margin-top: 8px;
vertical-align: middle;
}
<!-- =======Pop UP Section ======= -->
<div class="container">
<!-- Modal -->
<div class="modal fade right" id="exampleModalPreview" tabindex="-1" role="dialog" aria-labelledby="exampleModalPreviewLabel" aria-hidden="true">
<div class="modal-dialog-full-width modal-dialog momodel modal-fluid" role="document">
<div class="modal-content-full-width modal-content ">
<div class=" modal-header-full-width modal-header text-center">
<h5 class="modal-title w-100" id="exampleModalPreviewLabel">This is trial pop up</h5>
<button type="button" class="close " data-dismiss="modal" aria-label="Close">
<span style="font-size: 1.3em;" aria-hidden="true">×</span>
</button>
</div>
<!-- ===============Below div is Middle part of popup-->
<div class="modal-body">
<!-- Start Photos-->
<div>
<div class="container">
<div class="row">
<div class=" col-sm-6 col-xs-6">
<img src="https://www.w3schools.com/w3images/wedding.jpg" class="img-fluid">
<img src="https://www.w3schools.com/w3images/ocean.jpg" class="img-fluid">
</div>
<div class="col-sm-6 col-xs-6">
<img src="https://www.w3schools.com/w3images/underwater.jpg" class="img-fluid">
<img src="https://www.w3schools.com/w3images/ocean.jpg" class="img-fluid">
</div>
</div>
</div>
</div>
<!-- End Photos-->
<div class="container-fluid">
<h1 class="section-heading text-center wow fadeIn my-5 pt-3"> Not for money, but for humanity</h1>
</div>
</div>
<!-- ===============Below div is close button-->
<div class="modal-footer-full-width modal-footer">
<button type="button" class="btn btn-danger btn-md btn-rounded" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- =======End Pop Up Section ======= -->
Please help me with the right side space between modal and scrollbar.
Thanks in advance!

Related

Vue Custom dropdown not showing on modal

I've installed a module from https://desislavsd.gitbook.io and used it for my custom modal. However I have trouble the dropdown is not overlapping and stuck in here even adjusting z-index:999 does not do anything.
I also tried to make adjustments to the height but upon clicking the custom component but doesn't work because if I already make the height of the modal higher before the dropdown list is shown it would leave a big space below they dropdown which is not friendly looking.
Custom module https://jsfiddle.net/desislavsd/es2n6py0/
Either adjusting the height of the modal onclick will do or overlapping the dropdown as long as the lists are shown.
<div class="filter-body-w-auto shadows-box p-0 col-lg-5 col-md-6 col-sm-9" v-if="getSelectedFilterType == 'connectivity'">
<div class="filter-header">
<h6>Connectivity</h6>
<div class="filter-close-btn" #click="hideModal('')">
<i class="fa fa-times fa-lg" aria-hidden="true"></i>
</div>
</div>
<div class="row pt-1 px-2 mt-0 mb-2 mx-1 justify-content-evenly">
<p class="text-dark text-start mt-1 mb-0 mx-0 py-1 px-0" style="font-size: 100%;">Available to All Tenants</p>
<v-select v-model="selected.browsers" as="name:id:id" :from="browsers" tagging :tag-keys="[9,32,188]"></v-select>
</div>
</div>
-------------------------------------------------------------------------
<!-- Inspector code -->
<div data-v-796ce895="" class="filter-body-w-auto shadows-box p-0 col-lg-5 col-md-6 col-sm-9">
<div data-v-796ce895="" class="filter-header">
<h6 data-v-796ce895="">Connectivity</h6>
<div data-v-796ce895="" class="filter-close-btn">
</div>
</div>
<div data-v-796ce895="" class="row filter-tags pt-1 px-2 mt-0 mb-2 mx-1 justify-content-evenly">
<p data-v-796ce895="" class="text-dark text-start mt-1 mb-0 mx-0 py-1 px-0" style="font-size: 100%;">Available
to All Tenants</p>
<div data-v-796ce895="" tabindex="-1" class="v-select -empty -multiple">
<div class="v-select-bar">
<div class="v-select-inp-group"><input placeholder="Search.." class="v-select-inp"><button type="button"
tabindex="-1" class="v-select-btn-clear"></button><button type="button" tabindex="-1"
class="v-select-btn-dd"></button><button type="button" tabindex="-1"
class="v-select-btn-spinner"></button></div>
</div>
<div class="v-select-list">
<span class="v-select-option">Internet Explorer</span>
<span class="v-select-option">Firefox</span>
<span class="v-select-option">Chrome</span>
<span class="v-select-option">Opera</span>
<span class="v-select-option">Safari</span>
<span class="v-select-option">Opera3</span>
<span class="v-select-option">Opera2</span>
<span class="v-select-option">Opera2</span>
<span class="v-select-option">Opera1</span>
<span class="v-select-option">Opera11</span>
</div>
</div>
</div>
</div>
CSS
.filter-body-w-auto[data-v-796ce895] {
display: inline-block;
z-index: 99;
background: white;
border-radius: 6px;
box-shadow: 4px 4px 4px rgb(0 0 0 / 20%);
top: 400px;
transform: translate(-50%, 0);
overflow: hidden;
position: fixed;
height: 500px;
max-height: 100%;
}
.filter-header[data-v-796ce895] {
background: #466cb3;
padding: 10px 17px;
color: #FFF;
width: 100%;
text-align: left;
}
3rd party css module: https://github.com/desislavsd/vue-select/blob/master/dist/vue-select.css
Btw I also have used some bootstrap classes in here mixed with custom styles
Awkward design but another possible solution if overlap does not work

Scroll for background is not working

I am implementing a chat module like linked-in or facebook. User List is one parent component (col-md-12) and after each user click, I am creating a new child component (col-md-3 each). Everything is working fine but the scroll option on (col-md-12) is not working. The position of parent and child component is fixed hence the background scroll is only working if I scroll outside col-md-12 class area.
<div class="row" >
<div class="content">
<div class="row">
<div class="col-md-12" id="ng-chat-view">
<div class="col-md-3 chat-farmer-list-ui">
<div id="ng-chat-people" [ngClass]="{'ng-chat-people-collapsed':isCollapsed}">
<a href="javascript:void(0);" class="ng-chat-title shadowed" matTooltip={{farmerListTooltip}} (click)="onChatTitleClicked($event)">
<span>
Farmer List
</span>
</a>
<input *ngIf="!isCollapsed" id="ng-chat-search_friend" type="search" placeholder="Search" [(ngModel)]="search" (ngModelChange)="getFarmerBySearchVal(search)"
/>
<ul id="ng-chat-users" *ngIf="!isCollapsed">
<li *ngFor="let user of farmers">
<div *ngIf="!user.imageUrl" class="icon-wrapper">
<i class="user-icon"></i>
</div>
<img *ngIf="user.imageUrl" alt="" class="avatar" height="30" width="30" src="{{user.imageUrl}}"/>
<strong title="{{user.user}}" (click)="openChatWindow(user, true)">{{user.name}}</strong>
</li>
</ul>
</div>
</div>
<div class="col-md-9 m-l">
<div *ngFor="let user of userInfo; let i = index">
<div>
<app-chatwindow [userInfo]="user" (onWindowCloseNotify)="onWindowCloseInChildComponent($event)"></app-chatwindow>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
CSS:
#ng-chat-view{
position: fixed;
bottom: 0%;
margin-right: 10px;
font-family: Roboto,RobotoDraft,Helvetica,Arial,sans-serif;
font-size: 15px;
z-index:999;
cursor: pointer;
}
.row .m-l{
margin-left: -92px;
float: left;
}
#media (min-width: 992px){
.chat-farmer-list-ui {
float: right;
}
}

Z-index not working on div on fixed position header

I have a page using a masterpage in asp.net 4.0. My masterpage has header which has a search box. Header has css position fixed and have z-index 10.
I am trying to create a search instruction which will open when user types anything. my instruction box do not show as floatig over header instead it opens inside header and expands it. Here are my css and html
header {
width:100%;
display:inline-block;
background-color:#ef4023;
position:fixed;
z-index:10;
}
header #Guide {
width: 100%;
z-index: 5;
margin-right: -1px;
position:relative;
background: #eee;
border: 1px solid #ccc;
}
<header>
<div class="col-lg-4 col-md-4 col-sm-2 col-xs-4">
<div class="logo">
<img src="images/logo.png" alt="logo" class="img-responsive" />
</div>
</div>
<div class="col-lg-8 col-md-8 col-sm-10 col-xs-8">
<div class="col-md-6">
<!--SearchBarStart-->
<div ng-controller="MyCtrl">
<form>
<h3>Search Here </h3>
<input type="text" class="form-control" id="SearchKeyword" ng-model="searchText" required="required" />
<div class="list-group" id="Guide" ng-show="showLinks">
<a class="list-group-item" href="" ng-click="SearchType(0,true,'KeyWord', 1)">
<div class="input-group">
<span class="fa fa-suitcase"></span><span style="padding-left: 20px">instruction goes here</span>
</div>
</a>
</div>
</form>
</div>
</div>
</div>
</header>
You have to use position: fixed also on the instruction box, with according position settings. (relative will put it into the document flow, thereby taking up space, and absolute won't work since you don't have a relative parent for it.)
header {
width: 100%;
display: inline-block;
background-color: #ef4023;
position: fixed;
z-index: 10;
}
header #Guide {
width: 100%;
z-index: 15;
margin-right: -1px;
position: fixed;
top: 110px;
left: 0px;
background: #eee;
border: 1px solid #ccc;
}
<header>
<div class="col-lg-4 col-md-4 col-sm-2 col-xs-4">
<div class="logo">
<img src="images/logo.png" alt="logo" class="img-responsive" />
</div>
</div>
<div class="col-lg-8 col-md-8 col-sm-10 col-xs-8">
<div class="col-md-6">
<!--SearchBarStart-->
<div ng-controller="MyCtrl">
<form>
<h3>Search Here </h3>
<input type="text" class="form-control" id="SearchKeyword" ng-model="searchText" required="required" />
<div class="list-group" id="Guide" ng-show="showLinks">
<a class="list-group-item" href="" ng-click="SearchType(0,true,'KeyWord', 1)">
<div class="input-group">
<span class="fa fa-suitcase"></span><span style="padding-left: 20px">instruction goes here</span>
</div>
</a>
</div>
</form>
</div>
</div>
</div>
</header>`

Vertically centering dynamically loaded image inside bootstrap modal

How can i vertically center dynamically loaded image inside a div inside bootstrap modal?
My code is like
<div class="modal fade bs-example-modal-lg" id="post-expand-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-vert-align-helper">
<div class="modal-dialog modal-lg modal-vert-align-center" role="document">
<div class="modal-content" style="border-radius: 0;">
<div class="modal-body">
<div class="row no-margin">
<div class="col-md-8 left" >
<center id="post-center" style="margin-top:0;">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Penguins_walking_-Moltke_Harbour%2C_South_Georgia%2C_British_overseas_territory%2C_UK-8.jpg/220px-Penguins_walking_-Moltke_Harbour%2C_South_Georgia%2C_British_overseas_territory%2C_UK-8.jpg" id="full-img">
</center>
</div>
<div class="col-md-4 right"></div>
</div>
</div>
</div>
</div>
</div>
</div>
css
.modal-body{
min-height: 270px;
}
.left{
}
.right{
height:650px;
border:2px solid blue
}
#post-center{
background:grey;
height:100%;
width:100%;
}
#full-img{
}
I have created a fiddle here. Right now it looks like this
But i would like to make it look like this.
If anyone could help that would be great.
From your existing code and question it's hard to figure out what you want to achieve at different viewport widths, as you probably trimmed down your example too much, but I can only assume this helps:
.right {
border: 2px solid blue;
box-sizing: border-box;
height: 100%;
}
.gray-bg {
background: grey;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#media(max-height: 991px) {
.flex-me .gray-bg {
min-height: 80vh;
}
}
#media (min-width: 992px) {
.flex-me {
display: flex;
}
.gray-bg {
width: calc(100% + 15px);
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="modal fade bs-example-modal-lg" id="post-expand-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-vert-align-helper">
<div class="modal-dialog modal-lg modal-vert-align-center" role="document">
<div class="modal-content" style="border-radius: 0;">
<div class="modal-body">
<div class="row no-margin flex-me">
<div class="col-md-8">
<div class="text-center gray-bg">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Penguins_walking_-Moltke_Harbour%2C_South_Georgia%2C_British_overseas_territory%2C_UK-8.jpg/220px-Penguins_walking_-Moltke_Harbour%2C_South_Georgia%2C_British_overseas_territory%2C_UK-8.jpg"
id="full-img">
</div>
</div>
<div class="col-md-4">
<div class="right"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#post-expand-modal">
Launch Modal
</button>
Here's the fiddle.

Removing that annoying white background from thumbnails in Bootstrap 3

I have created small piece of code where it shows 4 thumbnails in a row of equal grid width.
.row-content-3 {
background-color: rgba(0,0,0,0.8) !important;
color: #fff;
margin:0px auto;
padding: 50px 0px 50px 0px;
min-height:200px;
}
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row row-content-3">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair1.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair2.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair3.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair4.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
</div>
If you run the code,you will notice that there is a white background which needs to be removed. I put this css simple code,but it didn't work:(.
.thumbnail {
border: 0;
}
Also I am giving you the jsfiddle.
Any ideas,
Thanks Theo.
If i am not wrong then you wanted to remove the white background from the circle image back only.
I Added this
.thumbnail {
border: 0;
background: transparent;
}
And you can see there is box shadow too. You can remove that by using
box-shadow: none;
Updated fiddle: https://jsfiddle.net/udgw71no/6/
Give background color as transparent for thumbnail class
.thumbnail {
border: 0;
background-color:transparent;
}
Updated fiddle : https://jsfiddle.net/affaz/udgw71no/8/
Looking for this ?
.thumbnail {
border: 0;
background: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
Demo
remove background of thumbnail but to make it working.
.row-content-3 {
background-color: rgba(0,0,0,0.8) !important;
color: #fff;
margin:0px auto;
padding: 50px 0px 50px 0px;
min-height:200px;
}
.thumbnail {
background: none !important;
border: 0 !important;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row row-content-3">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair1.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair2.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair3.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#">
<img src="http://www.theo-android.co.uk/github-images/fair4.png" class="img-circle" alt="Larissa's fair">
</a>
</div>
</div>
</div>
Setting the following styles should do it:
.thumbnail {
background-color: transparent;
border: none;
}

Resources