height alignment issue while displaying the products - css

I am doing an eCommerce project. While displaying the products list, if I insert any content inside, height will vary and total alignment is disturbed.
You can see the code below. I'm using bootstrap 4.
#product_list {
width: 210px;
margin-right: 0px;
font-size: 14px;
}
.product-item {
width: 100%;
height: 350px;
cursor: pointer;
background-color: #FFFFFF;
}
.product {
width: 100%;
height: 350px;
border: solid 2px #e9e9e9;
}
.product_image {
width: 100%;
text-align: center;
}
.product_image img {
width: 70%;
height: 70%;
}
<!-- Start to products display -->
<ul class="inline-item pt-2" style="padding-left:0px;padding-right:0px;" id="product_list_grid">
<li class="list-inline-item mb-1" id="product_list">
<div class="product-item mb-1">
<div class="product">
<div class="product_image">
<img src="images/FREEDOM.png" alt="">
</div>
<div class=" text-center mb-0 ">
<h6 class="product_brand"><a class="text-dark" href="single.html">Ashirvad</a></h6>
<h6 class="product_name">
<p class="card-text m-0">
<label> Ahirvad </label>
<button type="button" class="btn btn-sm text-white " id="background_color" data-toggle="modal" data-target="#myModal1"> 1kg </button>
</p>
</h6>
<p class=" mb-0">
<span>20pc/Box</span> ❙ <span>Min 5 boxes</span>
</p>
<div class="product_price">
<span>MRP : <del>$50</del></span> ❙ <span> <b> Sale : $40 </b> </span>
</div>
<div class="quantity mb-1 ">
<input type="button" value="-" class="minus " style="border-radius:50px;">
<span> 1 </span>
<input type="button" value="+" class="plus" style="border-radius:50px;">
</div>
<div class=" text-center my-2 ">
<a class="btn btn-sm text-white" id="background_color" href="#">add to cart</a>
</div>
</div>
</div>
</div>
</li>
<li class="list-inline-item mb-1" id="product_list">
<div class="product-item mb-1">
<div class="product">
<div class="product_image">
<img src="images/FREEDOM.png" alt="">
</div>
<div class=" text-center mb-0 ">
<h6 class="product_brand"><a class="text-dark" href="single.html">Ashirvad</a></h6>
<h6 class="product_name">
<p class="card-text m-0">
<label> Ahirvad </label>
<button type="button" class="btn btn-sm text-white " id="background_color" data-toggle="modal" data-target="#myModal1"> 1kg </button>
</p>
</h6>
<p class=" mb-0">
<span>20pc/Box</span> ❙ <span>Min 5 boxes</span>
</p>
<div class="product_price"> <span>MRP : <del>$50</del></span> ❙ <span> <b>
Sale : $40 </b> </span> </div>
<div class="quantity mb-1 ">
<input type="button" value="-" class="minus " style="border-radius:50px;">
<span> 1 </span>
<input type="button" value="+" class="plus" style="border-radius:50px;">
</div>
<div class=" text-center my-2 "><a class="btn btn-sm text-white" id="background_color" href="#">add to cart</a></div>
</div>
</div>
</div>
</li>
........
</ul>
This the code I am using to display the products ,while displaying if the list items content and images everything same it will display clearly. If I insert any content inside height alignment issue is arising.

<ul class="inline-item pt-2 d-flex flex-wrap" style="padding-left:0px;padding-right:0px;" id="product_list_grid">
<li class="list-inline-item mb-1" id="product_list">
<div class="product-item mb-1">
<div class="product">
<div class="product_image">
<img src="images/FREEDOM.png" alt="">
</div>
<div class=" text-center mb-0 ">
<h6 class="product_brand"><a class="text-dark" href="single.html">Ashirvad</a></h6>
<h6 class="product_name">
<p class="card-text m-0">
<label> Ahirvad </label>
<button type="button" class="btn btn-sm text-white " id="background_color"
data-toggle="modal" data-target="#myModal1">
1kg
</button>
</p>
</h6>
<p class=" mb-0">
<span>20pc/Box</span> ❙ <span>Min 5 boxes</span>
</p>
<div class="product_price"> <span>MRP : <del>$50</del></span> ❙ <span> <b>
Sale : $40 </b> </span> </div>
<div class="quantity mb-1 ">
<input type="button" value="-" class="minus " style="border-radius:50px;">
<span> 1 </span>
<input type="button" value="+" class="plus" style="border-radius:50px;">
</div>
<div class=" text-center my-2 "><a class="btn btn-sm text-white" id="background_color"
href="#">add
to cart</a></div>
</div>
</div>
</div>
</li>
<li class="list-inline-item mb-1" id="product_list">
<div class="product-item mb-1">
<div class="product">
<div class="product_image">
<img src="images/FREEDOM.png" alt="">
</div>
<div class=" text-center mb-0 ">
<h6 class="product_brand"><a class="text-dark" href="single.html">Ashirvad</a></h6>
<h6 class="product_name">
<p class="card-text m-0">
<label> Ahirvad </label>
<button type="button" class="btn btn-sm text-white " id="background_color"
data-toggle="modal" data-target="#myModal1">
1kg
</button>
</p>
</h6>
<p class=" mb-0">
<span>20pc/Box</span> ❙ <span>Min 5 boxes</span>
</p>
<div class="product_price"> <span>MRP : <del>$50</del></span> ❙ <span> <b>
Sale : $40 </b> </span> </div>
<div class="quantity mb-1 ">
<input type="button" value="-" class="minus " style="border-radius:50px;">
<span> 1 </span>
<input type="button" value="+" class="plus" style="border-radius:50px;">
</div>
<div class=" text-center my-2 "><a class="btn btn-sm text-white" id="background_color"
href="#">add
to cart</a></div>
</div>
</div>
</div>
</li>
</ul>
<style>
/* Start to css for product list */
#product_list {width:210px;
margin-right: 0px;
font-size: 14px;}
.product-item
{
width: 100%;
height: 350px;
cursor: pointer;
background-color: #FFFFFF;
}
.product {
width: 100%;
height: auto;
border: solid 2px #e9e9e9;
max-height: 600px;
}
.product_image
{
width: 100%;
text-align: center;
}
.product_image img
{
width: 70%;
height:70%;
}
/* END to css for product list */
</style>
use "d-flex" and "flex-wrap" class for ul tag. and use max-height instead of height.
I hope it would be helpful.

Related

How to use MDBootstrap Chat dynamically?

I am trying to user MdBootstrap 5's chat feature in my app.
This is what I have tried in the template but the thing is I need to refresh the page for it to work even though I am using SignalR in my backend.
<section style="background-color: #eee;">
<div class="container py-5">
<div class="row d-flex justify-content-center">
<div class="col-md-10 col-lg-8 col-xl-6">
<div class="card" id="chat2">
<div class="card-header d-flex justify-content-between align-items-center p-3">
<h5 class="mb-0">Chat</h5>
<button type="button" class="btn btn-primary btn-sm" data-mdb-ripple-color="dark">
Let's Chat
App
</button>
</div>
<div class="card-body" data-mdb-perfect-scrollbar="true" style="position: relative; height: 400px">
<div *ngFor="let message of (messageService.messageThread$ | async)">
<ng-container *ngIf="message.senderUsername !== currentUser!.userName">
<div class="d-flex flex-row justify-content-start">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-chat/ava3-bg.webp"
alt="avatar 1" style="width: 45px; height: 100%;">
<div>
<p class="small p-2 ms-3 mb-1 rounded-3" style="background-color: #f5f6f7;">ouweee {{message.content}}</p>
<p class="small ms-3 mb-3 rounded-3 text-muted">{{message.messageSent | date:'medium'}}</p>
<span class="text-danger" *ngIf="!message.dateRead">(unread)</span>
<span class="text-success" *ngIf="message.dateRead">(read {{message.dateRead + 'Z' | timeago}})</span>
</div>
</div>
</ng-container>
<ng-container *ngIf="message.senderUsername === currentUser!.userName">
<div class="d-flex flex-row justify-content-end mb-4 pt-1">
<div>
<p class="small p-2 me-3 mb-1 text-white rounded-3 bg-primary"> Nouwweee {{message.content}}</p>
<p class="small me-3 mb-3 rounded-3 text-muted d-flex justify-content-end">{{message.messageSent | date:'medium'}}</p>
<span class="text-danger" *ngIf="!message.dateRead">(unread)</span>
<span class="text-success" *ngIf="message.dateRead">(read {{message.dateRead + 'Z' | timeago}})</span>
</div>
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-chat/ava4-bg.webp"
alt="avatar 1" style="width: 45px; height: 100%;">
</div>
</ng-container>
</div>
<form [formGroup]="messageForm" enctype="multipart/form-data" (ngSubmit)="createNewMessage()">
<div class="card-footer text-muted d-flex justify-content-start align-items-center p-3">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-chat/ava3-bg.webp"
alt="avatar 3" style="width: 40px; height: 100%;">
<input type="text" class="form-control form-control-lg" id="exampleFormControlInput1"
placeholder="Type message" formControlName="content" name="content">
<a class="ms-1 text-muted" href="#!"><i class="fas fa-paperclip"></i></a>
<a class="ms-3 text-muted" href="#!"><i class="fas fa-smile"></i></a>
<button class="btn btn-primary" type="submit">Send</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
This is the page from which I extracted the MDBootstrap template :
https://mdbootstrap.com/docs/standard/extended/chat
Thanks for your time

Css Alignment Issue Angular Flexbox

I have a following HTML with Angular FlexLayout in it
<div fxLayout="column">
<div fxLayout fxLayoutAlign="space-between">
<span >
3123131
</span>
<span >
1231231
</span>
<span >
6568
</span>
<span >
989
</span>
</div>
<div fxLayoutGap="30px" fxLayout fxLayoutAlign="space-around">
<div class=" line first"></div>
<div class=" line red"></div>
<div class=" line first"></div>
<div class=" line red"></div>
</div>
</div>
<div fxLayout fxLayoutAlign="space-around" fxLayoutGap="20px"
style="border: 1px solid #eee; border-left: none; border-right: none; margin-left: 10px; padding: 10px;">
<span class=" large" style="text-align: left;">
12<span class="small" style="vertical-align: top;">%</span></span>
<span class=" large" style="text-align: right;">
68<span class="small" style="vertical-align: top;">%</span></span>
<span class=" large" style="text-align: left;">
45<span class="small" style="vertical-align: top;">%</span></span>
<span class=" large" style="text-align: right;">
35<span class="small" style="vertical-align: top;">%</span></span>
</div>
<div fxLayout="column" fxLayoutAlign="center">
<div fxLayoutGap="30px" fxLayout fxLayoutAlign="space-around">
<i class="icon thick"></i>
<i class="icon thick"></i>
<i class="icon thick"></i>
<i class="icon thick"></i>
</div>
<div fxLayout fxLayoutAlign="space-around">
<span class=" " style="text-align: right;">
684
</span>
<span class=" ">
3514
</span>
<span class=" ">
21
</span>
<span class=" ">
354
</span>
</div>
</div>
The output of this is as below,
But I want them to be evenly aligned in the same straight line, I can't figure out what mistake I'm making in this
Stackblitz
To make horizontal alignment easier, you can define each item as having no width and a centered content. That can be achieved with an inline-flex container:
.centered {
display: inline-flex;
justify-content: center;
width: 0px;
}
After setting the centered class on the items to align, make sure that you use the same spacing on all lines (either space-around or space-between). This stackblitz shows what it looks like when space-around is used:
<div fxLayout="column">
<div fxLayout fxLayoutAlign="space-around">
<span class="centered">3123131</span>
<span class="centered">1231231</span>
<span class="centered">6568</span>
<span class="centered">989</span>
</div>
<div fxLayout fxLayoutAlign="space-around">
<div class="centered line first"></div>
<div class="centered line red"></div>
<div class="centered line first"></div>
<div class="centered line red"></div>
</div>
</div>
<div fxLayout fxLayoutAlign="space-around" class="percentContainer">
<span class="centered large">12<span class="percent">%</span></span>
<span class="centered large">68<span class="percent">%</span></span>
<span class="centered large">45<span class="percent">%</span></span>
<span class="centered large">35<span class="percent">%</span></span>
</div>
<div fxLayout="column" fxLayoutAlign="center">
<div fxLayout fxLayoutAlign="space-around">
<i class="centered icon thick"></i>
<i class="centered icon thick"></i>
<i class="centered icon thick"></i>
<i class="centered icon thick"></i>
</div>
<div fxLayout fxLayoutAlign="space-around">
<span class="centered">684</span>
<span class="centered">3514</span>
<span class="centered">21</span>
<span class="centered">354</span>
</div>
</div>

IE11 issue with flex-box screen doesnt fit properly Angular8

I am facing an issue with CSS issue in IE11, all other browsers it works correctly.
The issue is due to string length the screen doesnt fit in the browser properly.
I tried setting display:flex,flex: 1 1 auto, flex-wrap:wrap, white-space:pre-wrap to the parent div whose span has the long string.
Please help me to troubleshoot this.
I have also copied the IE11 generated HTML.
Note: The screenshot is cropped version.
HTML markup:
<div class="row pad1-0" _ngcontent-ean-c19="">
<aside class="col-md-3 ng-star-inserted" id="sidebar" style="top: 0px;" _ngcontent-ean-c19="">
<div class="toggle-side" _ngcontent-ean-c19="">
<i class="fa fa-bars" _ngcontent-ean-c19=""></i>
</div>
<ul class="participant-menu popmenu" _ngcontent-ean-c19="">
<li class="menu-item ia-language saved" data-goto="ia-language" _ngcontent-ean-c19="">
Languages</li>
</ul>
</aside>
<main class="col-md-9 ng-star-inserted" id="main" _ngcontent-ean-c19="">
<section class="overview-options pad2-0 tright" _ngcontent-ean-c19="">
<div class="btn-group" role="group" _ngcontent-ean-c19="">
<button class="btn btn-secondary" onclick="window.print();" _ngcontent-ean-c19="">
<i class="fa fa-print" _ngcontent-ean-c19=""></i> Print</button>
<!--bindings={
"ng-reflect-ng-if": "true"
}--><button disabled="" class="btn btn-success btn-submit ng-star-inserted" _ngcontent-ean-
c19="">
<i class="fa fa-paper-plane" _ngcontent-ean-c19=""></i> Submit</button>
</div>
</section>
<app-languages-overview ng-reflect-model-errors="[object Object]" ng-reflect-has-edit-access="true"
ng-reflect-section="[object Object]" ng-reflect-validation-manager="[object Object]" ng-reflect-has-
fcdp-role="false" _ngcontent-ean-c19="" _nghost-ean-c21=""><section class="overview ia fields
language current" id="ia-language" _ngcontent-ean-c21="">
<app-overview-card-header ng-reflect-title="Languages" ng-reflect-is-edit-hidden="true" ng-reflect-
row-version="AAAAAABxc2A=" _ngcontent-ean-c21="" _nghost-ean-c35=""><div class="partTitle flex-row"
_ngcontent-ean-c35="">
<span class="secTitle" _ngcontent-ean-c35="">Languages</span>
<div class="flex-row history-dropdown ng-star-inserted" _ngcontent-ean-c35=""></div>
<nav class="right" _ngcontent-ean-c35="">
<a class="ng-star-inserted" _ngcontent-ean-c35=""><i class="fa fa-history" _ngcontent-ean-c35="">
</i></a>
<a class="ng-star-inserted" _ngcontent-ean-c35=""><i class="fa fa-pencil-alt" _ngcontent-ean-
c35=""></i></a>
<a class="ng-star-inserted" _ngcontent-ean-c35=""><i class="fa fa-compress ng-star-inserted"
_ngcontent-ean-c35=""></i></a>
</nav>
</div>
</app-overview-card-header>
<div class="part language border-right ng-star-inserted" _ngcontent-ean-c21="">
<div class="flex-row overviewContainer ng-star-inserted" _ngcontent-ean-c21="">
<div class="overview-field flex-row col-md-6 overviewItem" _ngcontent-ean-c21="">
<span title="What language do you use at home?" class="ovtitle" _ngcontent-ean-c21="">Home
Language</span>
<span class="ovval" _ngcontent-ean-c21="">English </span>
</div>
<div class="overview-field flex-row col-md-2 overviewItem" _ngcontent-ean-c21="">
<span title="Read" class="ovtitle" _ngcontent-ean-c21="">Read</span>
<span class="ovval" _ngcontent-ean-c21="">Yes </span>
</div>
<div class="overview-field flex-row col-md-2 overviewItem" _ngcontent-ean-c21="">
<span title="Write" class="ovtitle" _ngcontent-ean-c21="">Write</span>
<span class="ovval" _ngcontent-ean-c21="">Yes </span>
</div>
<div class="overview-field flex-row col-md-2 overviewItem" _ngcontent-ean-c21="">
<span title="Speak" class="ovtitle" _ngcontent-ean-c21="">Speak</span>
<span class="ovval" _ngcontent-ean-c21="">Yes </span>
</div>
</div>
<div class="ng-star-inserted" _ngcontent-ean-c21="">
<div class="flex-row overviewContainer ng-star-inserted" _ngcontent-ean-c21="">
<div class="overview-field flex-row col-md-6 caret overviewItem blank" _ngcontent-ean-c21="">
<span title="List any other languages you know" class="ovtitle" _ngcontent-ean-c21="">Other
Language
</span>
<span class="ovval" _ngcontent-ean-c21=""> </span>
</div>
<div class="overview-field flex-row col-md-2 overviewItem blank" _ngcontent-ean-c21="">
<span title="Read" class="ovtitle" _ngcontent-ean-c21="">Read</span>
<span class="ovval" _ngcontent-ean-c21=""> </span>
</div>
<div class="overview-field flex-row col-md-2 overviewItem blank" _ngcontent-ean-c21="">
<span title="Write" class="ovtitle" _ngcontent-ean-c21="">Write</span>
<span class="ovval" _ngcontent-ean-c21=""> </span>
</div>
<div class="overview-field flex-row col-md-2 overviewItem blank" appHistoryData="" _ngcontent-
ean-c21="">
<span title="Speak" class="ovtitle" _ngcontent-ean-c21="">Speak</span>
<span class="ovval" _ngcontent-ean-c21=""> </span>
</div>
</div>
</div>
<div class="flex-row overviewContainer" _ngcontent-ean-c21=""></div>
<div class="flex-row overviewContainer" _ngcontent-ean-c21="">
<div class="overview-field flex-row col-md-12 overviewItem blank" _ngcontent-ean-c21="">
<span title="Notes" class="ovtitle" _ngcontent-ean-c21="">Notes</span>
<span class="ovval" _ngcontent-ean-c21=""> </span>
</div>
</div>
</div>
</section>
</app-languages-overview>
<app-ncp-overview style="overflow: hidden; display: flex; align-items: stretch;" ng-reflect-model-
errors="[object Object]" ng-reflect-has-edit-access="true" ng-reflect-section="[object Object]" ng-
reflect-validation-manager="[object Object]" ng-reflect-has-fcdp-role="false" _ngcontent-ean-c19=""
_nghost-ean-c33=""><section class="overview ia fields ncp current ng-star-inserted" id="ia-ncp"
_ngcontent-ean-c33="">
<app-overview-card-header ng-reflect-title="Non-Custodial Parents" ng-reflect-is-edit-hidden="true"
ng-reflect-row-version="AAAAAABxggI=" _ngcontent-ean-c33="" _nghost-ean-c35=""><div
class="partTitle flex-row" _ngcontent-ean-c35="">
<span class="secTitle" _ngcontent-ean-c35="">Non-Custodial Parents</span>
<a class="ng-star-inserted" _ngcontent-ean-c35=""><i class="fa fa-pencil-alt" _ngcontent-ean-c35="">
</i></a>
<a class="ng-star-inserted" _ngcontent-ean-c35=""><i class="fa fa-compress ng-star-inserted"
_ngcontent-ean-c35=""></i><!--bindings={
"ng-reflect-ng-if": "false"
}--></a>
</nav>
</div>
</app-overview-card-header>
<div class="part ncp ng-star-inserted" style="flex:1 1 0px; overflow: hidden; display: flex; flex-
direction: row;" _ngcontent-ean-c33="">
<div class="ng-star-inserted" _ngcontent-ean-c33="">
<div class="caretaker ng-star-inserted" _ngcontent-ean-c33="">
<div class="row" _ngcontent-ean-c33="">
<div class="overview-field col-md-4" style="display: flex; flex-direction: row;"
_ngcontent-ean-c33="">
<span title="Relationship to Child(ren)" class="ovtitle" _ngcontent-ean-
c33="">Relationship to Child(ren)</span>
<span class="ovval" _ngcontent-ean-c33="">Other Parent </span>
</div>
<div class="overview-field col-md-8" style="flex:1 1 0px; overflow: hidden; display:
flex; flex-direction: row; align-items: stretch;" _ngcontent-ean-c33="">
<span title="Relationship to Child(ren) - Details" class="ovtitle" _ngcontent-ean-
c33="">Details</span>
<span class="ovval" _ngcontent-ean-c33="">fdsfadsfdsfdfdfdsfdsfsdfdfdfdsfsdfsdfsdfdsfdsfdsfdsfasdfsdfasdfsfsdffdsfadsfdsfdfdfdsfdsfsdfdfdfdsfsdfsdfsdfdsfdsfdsfdsfasdfsdfasdfsfsdffdsfadsfdsfdfdfdsfdsfsdfdfdfdsfsdfsdfsdfdsfdsfdsfdsfasdfsdfasdfsfsdffdsfadsfdsfdfdfdsfdsfsdfdfdfdsfsdfsdfsdfdsfdsfdsfdsfasdfsdfasdfsfsdffdsfadsfdsfdfdfdsfdsfsdfdfdfdsfsdfsdfsdfdsfdsfdsfdsfasdfsdfasdfsfsdffdsfadsfdsfdfdfdsfdsfsdfdfdfdsfsdfsdfsdf </span>
</div>
</div>
</div>
</div><div class="row" _ngcontent-ean-c33=""></div>
<div class="row" _ngcontent-ean-c33=""></div>
</div>
</section>
</app-ncp-overview>
</main>
</div>
I was able to fix this issue, the word-break: break-word; was causing the issue in IE11,
i changed it to word-break: break-all; and it started working..spent 3 hrs on this :)

My Last Element in the div Overflows so Only Half of the Element is Visible

I'm preparing my site for mobile browsers, so on Chrome Dev Tools i've tested on 320 x 568 size and i've encountered this problem.
My button element is on the bottom of the div, but half of the button is visible, other half is not.
Screenshot on the situation
I've tried to style the background (background-size etc) but the changes did not solve the issue.
What's the basic documentation / suggestion to overcome this problem?
Parent Div
<div class="view" id="activeSubstance" data-spy="activeSubstance" data-target="#activeSubstance" style="background-image: url('img/calculate_02.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center center;"></div>
The Child
<div class="row text-center align-items-center mt-3">
<div class="col" id="calculate">
<button type="button" class="btn btn-cyan btn-lg disabled" id="calcButton">Hesaplayalım</button>
</div>
</div>
Full Code
<div class="view" id="activeSubstance" data-spy="activeSubstance" data-target="#activeSubstance" style="background-image: url('img/calculate_02.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center center;">
<!-- Mask & flexbox options-->
<div class="mask rgba-stylish-light align-items-center flex-center">
<!-- Content -->
<div class="container">
<div class="row mt-3">
<!--Dropdown primary-->
<div class="col mt-2">
<!--Dropdown primary-->
<div class="dropdown">
<!--Trigger-->
<a class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="display: block">Etken Madde Seçimi</a>
<!--Menu-->
<div class="dropdown-menu dropdown-primary" id="substanceList">
<a class="dropdown-item">Daptomisin - <small>Cubicin</small></a>
<a class="dropdown-item">Ertapenem sodyum - <small>İnvanz</small></a>
<a class="dropdown-item">Flukonazol - <small>Lumen EF</small></a>
<a class="dropdown-item">İmipenem / Silastatin sodyum - <small>Tienam</small></a>
<a class="dropdown-item">Kolistimetat sodyum - <small>Colimycin</small></a>
<a class="dropdown-item">Levofloksasin - <small>Tavanic</small></a>
<a class="dropdown-item">Linezolit - <small>Zyvoxid</small></a>
<a class="dropdown-item">Meropenem trihidrat - <small>Meronem</small></a>
<a class="dropdown-item">Metronidazol - <small>Metronidazol</small></a>
<a class="dropdown-item">Moksifloksasin hidroklorür - <small>Avelox</small></a>
<a class="dropdown-item">Piperasilin sodyum / Tazobaktam sodyum - <small>Tazocin EF</small></a>
<a class="dropdown-item">Sefoperazon sodyum / Sulbaktam sodyum - <small>Sulperazon</small></a>
<a class="dropdown-item">Siprofloksasin laktat - <small>Ciproktan</small></a>
<a class="dropdown-item">Teikoplanin - <small>Targocid</small></a>
<a class="dropdown-item">Tigesiklin - <small>Tygacil</small></a>
<a class="dropdown-item">Vankomisin hidroklorür - <small>Vancotek</small></a>
</div>
</div>
</div>
<!--/Dropdown primary-->
<!--Dropdown primary-->
<div class="col mt-2">
<!--Dropdown primary-->
<div class="dropdown">
<!--Trigger-->
<a class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="display: block">Cockcroft-Gault Denklemi</a>
<!--Menu-->
<div class="dropdown-menu dropdown-info" id="methodlist">
<a class="dropdown-item2" id="willDisable">Cockcroft-Gault Denklemi</a>
<a class="dropdown-item2" id="willDisable2">e-GFR Hesaplayıcısı</a>
</div>
</div>
</div>
<!--/Dropdown primary-->
</div>
<div class="row mt-3">
<div class="col" style="display:none" id="notNeeded">
<p class="note note-info wow fadeIn" id="nonDiyaText">Bu etken madde için böbrek yetmezliği durumunda doz ayarlaması gerekmemektedir.</p>
</div>
</div>
<div class="row text-center align-items-center" id="cockgaulty">
<div class="col-6 col-lg-2">
<select class="browser-default custom-select" id="gender1">
<option selected>Cinsiyet</option>
<option value="1">Erkek</option>
<option value="2">Kadın</option>
</select>
</div>
<div class="col-6 col-lg-2 md-form input-group mb-3">
<input type="number" id="age1" class="form-control" placeholder="Yaş" aria-label="Yaş" aria-describedby="material-addon1" step='1' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-2 md-form input-group mb-3">
<input type="number" id="srcr1" class="form-control" placeholder="Serum kreatinini" aria-label="Serum kreatinini" aria-describedby="material-addon1" step='0.01' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-2">
<select class="browser-default custom-select" id="crunit1">
<option selected value="1">mg/dL</option>
<option value="2">‎µmol/L</option>
</select>
</div>
<div class="col-6 col-lg-2 md-form input-group mb-3">
<input type="number" id="weight" class="form-control" placeholder="Ağırlık" aria-label="Ağırlık" aria-describedby="material-addon1" step='0.5' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-2 custom-control custom-checkbox mt-3" id="diya1" style="padding-left: 2.5rem;">
<input type="checkbox" class="custom-control-input" id="diyaliz1">
<label class="custom-control-label" id="dia1" for="diyaliz1">Hemodiyaliz Alıyor</label>
</div>
</div>
<div class="row text-center align-items-center" style="display:none" id="egfry">
<div class="col-6 col-lg-2">
<select class="browser-default custom-select" id="gender2">
<option selected>Cinsiyet</option>
<option value="1">Erkek</option>
<option value="2">Kadın</option>
</select>
</div>
<div class="col-6 col-lg-1 md-form input-group mb-3">
<input type="number" id="age2" class="form-control" placeholder="Yaş" aria-label="Yaş" aria-describedby="material-addon1" step='1' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-2 md-form input-group mb-3">
<input type="number" id="srcr2" class="form-control" placeholder="Serum kreatinini" aria-label="Serum kreatinini" aria-describedby="material-addon1" step='0.01' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-1">
<select class="browser-default custom-select" id="crunit2">
<option selected value="1">mg/dL</option>
<option value="2">‎µmol/L</option>
</select>
</div>
<div class="col-6 col-lg-1 md-form input-group mb-3">
<input type="number" id="nitrog" class="form-control" placeholder="BUN" aria-label="BUN" aria-describedby="material-addon1" step='0.01' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-2 md-form input-group mb-3">
<input type="number" id="albumin" class="form-control" placeholder="Albumin" aria-label="Albumin" aria-describedby="material-addon1" step='0.01' autocomplete="off" min="0">
</div>
<div class="col-6 col-lg-1 custom-control custom-checkbox mt-2">
<input type="checkbox" class="custom-control-input" id="black">
<label class="custom-control-label" for="black">Siyahi</label>
</div>
<div class="col-6 col-lg-2 custom-control custom-checkbox mt-2" id="diya2">
<input type="checkbox" class="custom-control-input" id="diyaliz2">
<label class="custom-control-label" id="dia2" for="diyaliz2">Hemodiyaliz Alıyor</label>
</div>
</div>
<div class="row mt-3">
<div class="col" id="infoDiv">
<p class="note note-info wow fadeIn" id="infoText"><strong>Cockcroft-Gault Denklemi </strong>ile hesaplama yaparken cinsiyet, yaş, ağırlık ve serum kreatinini değerlerini girmeniz gerekir.</p>
</div>
</div>
<div class="row text-center align-items-center mt-3">
<div class="col" id="calculate">
<button type="button" class="btn btn-cyan btn-lg disabled" id="calcButton">Hesaplayalım</button>
</div>
</div>
<!-- /Content -->
</div>
</div>
Problem Causing "view" class CSS
.view {
position: relative;
overflow: hidden;
cursor: default; }
.view .mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
width: 100%;
height: 100%;
background-attachment: fixed; }
.view img, .view video {
position: relative;
display: block; }
.view video.video-intro {
z-index: -100;
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
-webkit-transition: 1s opacity;
-o-transition: 1s opacity;
transition: 1s opacity;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto; }
PS: As you can see in the screenshot, "The end of the div" i've mentioned is not the end of the page, instead another DIV starts. But my button overflowed from the div above and only half of it is visible
close the div class="view" may be your problem resolved

get rid of white space in thumbnail

I'm trying to get rid of extra white space in an img-thumbnail. I adjusted padding in bootstrap.css but nothing changed ! How can I force it to remove this big space ?
bootstrap.css
.img-thumbnail {
display: inline-block;
max-width: 100%;
padding: 3px;
line-height: 1.42857143;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
-webkit-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
view page
<% #store.products.each_with_index do |product,index| %>
<div class="col-sm-4">
<div class="img-thumbnail">
<%= link_to image_tag(root_url + "/images/" + product.filename, size: "200x150", alt: product.filename), product %>
<div class="caption">
<h4 class="pull-right">$ <%= product.price %></h4>
<h4><%= product.name %></h4>
<div id="star-img">
<% if current_user != product.store.user %>
<%= rating_for product, "overall", :enable_half => false,:disable_after_rate => false %>
<% end %>
</div>
</div>
</div>
</div>
<%end %>
A screen shot http://postimg.org/image/4ih2jd481/
how can I decrease padding between each thumbnail as well. I tried to add right-padding and set a low number of pixels, it would not work either.
It's most likely the columns that need to have any padding reduced. You can use CSS Attribute Selectors to accomplish this. See MDN for more information. See the second working example labeled Thumbnail Example that applies specifically to your issue.
Basic Example:
.some-class > [class*='red'] {
background: red;
}
.another-class {
background: green;
}
<div class="some-class">
<div class="no-class">
NOT RED
</div>
<div class="red">
RED
</div>
<div class="another-class">
GREEN
</div>
<div class="red">
RED
</div>
<div class="no-class">
NOT RED
</div>
<div class="no-class">
NOT RED
</div>
<div class="another-class">
GREEN
</div>
</div>
Sidenote: You may want to consider using the thumbnail class instead of img-thumbnail since it appears to cover your use case. And you may need to clear your columns if the thumbnails are dynamically generated and vary in height.
Thumbnail Example:
body {
padding-top: 25px;
}
.thumbnail-gutter > [class*='col-'] {
padding-right: 4px;
padding-left: 4px;
}
.thumbnail-gutter .thumbnail {
border: 4px solid #f00;
}
#media (min-width: 768px) and (max-width: 1199px) {
.thumbnail-gutter .col-sm-4:nth-child(3n+1) {
clear: left
}
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row thumbnail-gutter">
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/000/fff">
<div class="caption">
<h4 class="pull-right">$100.00</h4>
<h4>ONE NAMENAMENAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/ff0/fff">
<div class="caption">
<h4 class="pull-right">$5.00</h4>
<h4>TWO NAMENAME NAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/f00/fff">
<div class="caption">
<h4 class="pull-right">$55.00</h4>
<h4>THREE NAMENAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/ff0/fff">
<div class="caption">
<h4 class="pull-right">$5.00</h4>
<h4>FOUR NAMENAME NAMENAME NAMENAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/000/fff">
<div class="caption">
<h4 class="pull-right">$55.00</h4>
<h4>FIVE NAMENAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/f00/fff">
<div class="caption">
<h4 class="pull-right">$5.00</h4>
<h4>SIX NAMENAME NAMENAME NAMENAME NAMENAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="http://placehold.it/750x375/444/f00">
<div class="caption">
<h4 class="pull-right">$55.00</h4>
<h4>SEVEN NAMENAME NAMENAME</h4>
<div id="star-img">
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
<span class="fa fa-star-o"></span>
</div>
</div>
</div>
</div>
</div>
</div>

Resources