Responsive image issue in materializecss - html

I am creating a website with materializecss and having some issue with FAB and responsive image. For FAB issue I already did a post here.
floating button issue in material css
But I need some help for responsive image. Its always coming in oval shape. Ii I use respoonsive image in collection it is working fine. Not sure how to get a prefect shape,
html :
<div class="user-feed-main-box box">
<ul class="collection">
<li class="collection-item avatar">
<img src="" alt="" class="circle">
<span class="title"><p>user Shared a post Art </p></span>
<p> <label for="icon_prefix"><i class="material-icons left">timer</i>a min ago.</label> <br>
</p>
</li>
</ul>
<div class="row">
<div class="col s2">
<div class="container">
<img src="" alt="" class="responsive-img circle">
</div>
</div>
<div class="col">
<p>User Shared a post Art </p>
<label for="icon_prefix"><i class="material-icons left">timer</i>a min ago.</label>
</div>
</div>
<div class="container">
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Magnam eos in ea dolor eligendi repudiandae
praesentium
modi. Consequuntur, accusantium culpa! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magni
sapiente ipsa amet eos officiis aperiam atque. Nemo corporis quibusdam ipsa placeat voluptate fugiat fuga
veniam possimus maxime doloremque veritatis ullam quam odit eligendi, id, sequi quas consequuntur
perferendis accusamus, harum culpa quis animi. Minima, est minus? Optio dolor mollitia perspiciatis.</p>
<div class="carousel carousel-slider">
<a class="carousel-item" href="#one!"><img
src=""></a>
<a class="carousel-item" href="#two!"><img
src=""></a>
<a class="carousel-item" href="#three!"><img
src=""></a>
<a class="carousel-item" href="#four!"><img
src=""></a>
<a class="carousel-item" href="#five!"><img
src=""></a>
</div>
</div>
</d

There was a reported issue similar to this in the Materialize GitHub repo. It appears the solution for that was to not use materialize and instead implement the below.
.ratio {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
height: 0;
padding-bottom: 100%;
position: relative;
width: 100%;
}
.img-circle {
border-radius: 50%;
}
.img-responsive {
display: block;
height: auto;
max-width: 100%;
}
And then change the img html to
<div class="ratio img-responsive img-circle" style="background-image:url('somepicture.jpg');"></div>

Related

I add the order element in the css, but the positions do not change

<section id="home">
<div class="container">
<div class="row align-items-center container-items">
<div class="col-md-6">
<div class="info">
<h1>Lorem ipsum dolor sit amet <u style="color: rgb(165, 177, 231);">consectetur.</u> </h1>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Fuga, pariatur corporis! Quaerat officiis sit rerum exercitationem
facilis quas ex veritatis quod dolores delectus reiciendis autem dignissimos doloremque consequuntur, ad eaque possimus corrupti.
Fugiat, non unde labore, cupiditate nobis quis maxime error, omnis rerum tenetur officiis ea doloremque qui nihil officia?</p>
</div>
<ul>
<li>
<img src="./image/freshfood.png" alt="">
<span><u>Fresh Foods</u> </span>
</li>
<li>
<img src="./image/restaurant.png" alt="">
<span> <u>Master Chefs</u> </span>
</li>
</ul>
</div>
<div class="col-md-6 food-img">
<div>
<img src="image/home.png" alt="">
</div>
</div>
</div>
</div>
</section>
I want the home.png image and h1,p elements in the html codes to be replaced under 575.98 px. When I bring the device to these dimensions, h1,p is on the top and home.png is on the bottom. For this reason;
#home .container-items {
display: flex;
}
#home .info{
max-width: 100%;
height: 15rem;
order: 1 ;
}
#home .food-img{
order: 2;
}
I wrote these codes. Could you please explain this to me; For the order element to work, don't I need to assign the order element in the css to the classes or ids I gave to these divs? Like the food-img and info classes in this code.
As Paulie_D points out, this only works on the direct children (identified by the class flex-item-1 and flex-item-2 in the code below). You can then specify the order for the child elements:
#home .container-items {
display: flex;
}
#home .info {
max-width: 100%;
height: 15rem;
}
#media only screen and (max-width: 575.98px) {
.container-items {
flex-direction: column;
}
.flex-item-1 {
order: 2;
}
.flex-item-2 {
order: 1;
}
}
<section id="home">
<div class="container">
<div class="row align-items-center container-items">
<div class="col-md-6 flex-item-1">
<div class="info">
<h1>
Lorem ipsum dolor sit amet
<u style="color: rgb(165, 177, 231)">consectetur.</u>
</h1>
<p>
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Fuga,
pariatur corporis! Quaerat officiis sit rerum exercitationem
facilis quas ex veritatis quod dolores delectus reiciendis autem
dignissimos doloremque consequuntur, ad eaque possimus corrupti.
Fugiat, non unde labore, cupiditate nobis quis maxime error,
omnis rerum tenetur officiis ea doloremque qui nihil officia?
</p>
</div>
<ul>
<li>
<img src="https://picsum.photos/60" alt="" />
<span><u>Fresh Foods</u> </span>
</li>
<li>
<img src="https://picsum.photos/60" alt="" />
<span> <u>Master Chefs</u> </span>
</li>
</ul>
</div>
<div class="col-md-6 food-img flex-item-2">
<div>
<img src="https://picsum.photos/300/200" alt="" />
</div>
</div>
</div>
</div>
</section>
In this case, you could just use flex-direction: column-reverse; though:
#home .container-items {
display: flex;
}
#home .info {
max-width: 100%;
height: 15rem;
}
#media only screen and (max-width: 575.98px) {
.container-items {
flex-direction: column-reverse;
}
}
<section id="home">
<div class="container">
<div class="row align-items-center container-items">
<div class="col-md-6 flex-item-1">
<div class="info">
<h1>
Lorem ipsum dolor sit amet
<u style="color: rgb(165, 177, 231)">consectetur.</u>
</h1>
<p>
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Fuga,
pariatur corporis! Quaerat officiis sit rerum exercitationem
facilis quas ex veritatis quod dolores delectus reiciendis autem
dignissimos doloremque consequuntur, ad eaque possimus corrupti.
Fugiat, non unde labore, cupiditate nobis quis maxime error,
omnis rerum tenetur officiis ea doloremque qui nihil officia?
</p>
</div>
<ul>
<li>
<img src="https://picsum.photos/60" alt="" />
<span><u>Fresh Foods</u> </span>
</li>
<li>
<img src="https://picsum.photos/60" alt="" />
<span> <u>Master Chefs</u> </span>
</li>
</ul>
</div>
<div class="col-md-6 food-img flex-item-2">
<div>
<img src="https://picsum.photos/300/200" alt="" />
</div>
</div>
</div>
</div>
</section>

The float left isn't working with a specific icon [duplicate]

This question already has answers here:
Floated elements of variable height push siblings down
(3 answers)
Closed 1 year ago.
JSFiddle
<div class="container">
<div class="row">
<div class="col-6">
<div class="card">
<!-- plane icon img -->
<img src="https://i.imgur.com/JhOKdVb.png" alt="plane" class="card__icon">
<div class="card__body">
<h3>Lorem Ipsum</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat dolore eaque veniam architecto. Impedit expedita facilis error nostrum harum cumque, iste aspernatur</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<!-- game-pad icon img -->
<img src="https://i.imgur.com/c5O6IOS.png" alt="plane" class="card__icon">
<div class="card__body">
<h3>Lorem Ipsum</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat dolore eaque veniam architecto. Impedit expedita facilis error nostrum harum cumque, iste aspernatur</p>
</div>
</div>
</div>
<div class="col-6">
<div class="card">
<!-- plane icon img -->
<img src="https://i.imgur.com/JhOKdVb.png" alt="plane" class="card__icon">
<div class="card__body">
<h3>Lorem Ipsum</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat dolore eaque veniam architecto. Impedit expedita facilis error nostrum harum cumque, iste aspernatur</p>
</div>
</div>
</div>
</div>
</div>
.container{
max-width: 1200px;
margin-right: auto;
margin-left: auto;
}
.row:before,.row:after{
content: '';
display: block;
clear: both;
display: table;
}
.col-6{
width: 50%;
float: left;
}
.card{
margin-bottom: 50px;
}
img{
max-width: 100%;
height: auto;
}
I created the columns using the CSS float property. No framework! Everything is working fine but the last column in the row isn't floating left. can anyone explain?
Interesting Fact:
I'm using only two icons called Plane and Gamepad. Interestingly when I changed the Gamepad icon with the 'Plane' icon, it fixes the problem! Still can't figure out why this is happening.
You need to use:
float: right;
That's what you need.

how do i go about aligning two images with two paragraphs? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
How can I make it so I have one image on the left, with a paragraph on the right. Then another image on the right, with a paragraph on the left.
Like this
I think it's simple but i can't get my head around how to do it
Most people use flex or grid to do this, some people use float too.
This is your answer via flex
img {max-width: 100%}
.blog-card {
width: 700px;
margin: 30px auto 0;
padding: 15px;
border-radius: 5px;
background: #f0f0f0;
display: flex;
}
.thumbnail {
-ms-flex: 0 0 300px;
flex: 0 0 300px;
max-width: 300px;
margin-right: 15px;
}
.blog-card:nth-child(even) .thumbnail {
order: 2;
margin: 0;
}
<div class="blog-card">
<div class="thumbnail">
<a href="#">
<img src="https://images.pexels.com/photos/2693529/pexels-photo-2693529.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Thumbnail">
</a>
</div>
<div class="blog-card-blody">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nostrum necessitatibus dolore doloremque laborum iste ad aspernatur praesentium quas magnam deserunt!</p>
</div>
</div>
<div class="blog-card">
<div class="thumbnail">
<a href="#">
<img src="https://images.pexels.com/photos/2693529/pexels-photo-2693529.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Thumbnail">
</a>
</div>
<div class="blog-card-blody">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nostrum necessitatibus dolore doloremque laborum iste ad aspernatur praesentium quas magnam deserunt!</p>
</div>
</div>
<div class="blog-card">
<div class="thumbnail">
<a href="#">
<img src="https://images.pexels.com/photos/2693529/pexels-photo-2693529.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Thumbnail">
</a>
</div>
<div class="blog-card-blody">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nostrum necessitatibus dolore doloremque laborum iste ad aspernatur praesentium quas magnam deserunt!</p>
</div>
</div>
<div class="blog-card">
<div class="thumbnail">
<a href="#">
<img src="https://images.pexels.com/photos/2693529/pexels-photo-2693529.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="Thumbnail">
</a>
</div>
<div class="blog-card-blody">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Nostrum necessitatibus dolore doloremque laborum iste ad aspernatur praesentium quas magnam deserunt!</p>
</div>
</div>

image doesnt fit parent element

image doesnt fit parent element
here is the full code
https://jsfiddle.net/601q9j7c/1/
<section class="cards">
<div class="card">
<div class="img-data">
<div clas="bgimg"> <img src="https://cdn.pixabay.com/photo/2015/01/10/16/45/home-office-595476_960_720.jpg" alt=""> </div>
<div class="cardDetails">
<span class="date"><i class="fas fa-calendar-alt"></i> March 30, 2020 </span>
</div>
</div>
<div class="post-data">
<h1 class="title">Vuestic – Free Vue Admin Template</h1>
<p class="description">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Accusantium ullam ratione id nihil quis officia voluptas vitae molestiae provident natus exercitationem, praesentium maiores quo quas ducimus. Voluptatibus debitis ea perferendis?</p>
<div class="cta">
Read more →
</div>
</div>
</div>
</section>
If you don't set any defined width in either the CSS or the <img> tag, the image will be displayed at full size regardless of its container. This is your issue. So you need to ensure the image is at maximum 100% of it's parent's width.
HTML only
<section class="cards">
<div class="card">
<div class="img-data">
<div clas="bgimg"> <img src="https://cdn.pixabay.com/photo/2015/01/10/16/45/home-office-595476_960_720.jpg" alt="" width="100%"> </div>
<div class="cardDetails">
<span class="date"><i class="fas fa-calendar-alt"></i> March 30, 2020 </span>
</div>
</div>
<div class="post-data">
<h1 class="title">Vuestic – Free Vue Admin Template</h1>
<p class="description">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Accusantium ullam ratione id nihil quis officia voluptas vitae molestiae provident natus exercitationem, praesentium maiores quo quas ducimus. Voluptatibus debitis ea perferendis?</p>
<div class="cta">
Read more →
</div>
</div>
</div>
</section>
It is best practise to do this with CSS rather than directly into HTML, but you have not shown any CSS in your question.
A CSS example is below:
CSS example
.bgimg > img {
max-width: 100%;
width: 100%;
height:auto;
}
<section class="cards">
<div class="card">
<div class="img-data">
<div class="bgimg"> <img src="https://cdn.pixabay.com/photo/2015/01/10/16/45/home-office-595476_960_720.jpg" alt=""> </div>
<div class="cardDetails">
<span class="date"><i class="fas fa-calendar-alt"></i> March 30, 2020 </span>
</div>
</div>
<div class="post-data">
<h1 class="title">Vuestic – Free Vue Admin Template</h1>
<p class="description">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Accusantium ullam ratione id nihil quis officia voluptas vitae molestiae provident natus exercitationem, praesentium maiores quo quas ducimus. Voluptatibus debitis ea perferendis?</p>
<div class="cta">
Read more →
</div>
</div>
</div>
</section>
First of all ! your spelling your class is wrong, that's why image is not fitting.
Make the width of the image to be 100% and its height is auto so that is don't stretch but then your image may be come out of parent container make there overflow:hidden
.cards {
display: flex;
justify-content: center;
}
.card {
width: 60%;
justify-content: center;
display: grid;
grid-template-columns: 50% 50%;
box-shadow: 10px 0px 20px rgba(0,0,0,0.08);
height: 25rem;
}
.img-data {
height: 100%;
z-index: 1;
background-color: salmon;
display: grid;
grid-template-rows: 50% 50%;
}
.bgimg {
overflow: hidden;
}
.bgimg img {
height: auto;
width: 100%;
}
<section class="cards">
<div class="card">
<div class="img-data">
<div class="bgimg"> <img src="https://cdn.pixabay.com/photo/2015/01/10/16/45/home-office-595476_960_720.jpg" alt=""> </div>
<div class="cardDetails">
<span class="date"><i class="fas fa-calendar-alt"></i> March 30, 2020 </span>
</div>
</div>
<div class="post-data">
<h1 class="title">Vuestic – Free Vue Admin Template</h1>
<p class="description">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Accusantium ullam ratione id nihil quis officia voluptas vitae molestiae provident natus exercitationem, praesentium maiores quo quas ducimus. Voluptatibus debitis ea perferendis?</p>
<div class="cta">
Read more →
</div>
</div>
</div>
</section>
This should work and is dynamic:
This gives the image an inherited width and height, which means that it replicates the width of the previous object. It is given with the property style="width: inherit; height: inherit;"
.bgimg {
width: 500px; /*Or whatever you want...*/
}
/* this CSS can be directly inserted in a tag with style="width: 500px;"*/
<section class="cards">
<div class="card">
<div class="img-data">
<div class="bgimg"><!--*NOTE: you wrote <div clas="bgimg">(you missed an 's')--><img src="https://cdn.pixabay.com/photo/2015/01/10/16/45/home-office-595476_960_720.jpg" alt="" style="width: inherit; height: inherit;"> </div>
<div class="cardDetails">
<span class="date"><i class="fas fa-calendar-alt"></i> March 30, 2020 </span>
</div>
</div>
<div class="post-data">
<h1 class="title">Vuestic – Free Vue Admin Template</h1>
<p class="description">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Accusantium ullam ratione id nihil quis officia voluptas vitae molestiae provident natus exercitationem, praesentium maiores quo quas ducimus. Voluptatibus debitis ea perferendis?</p>
<div class="cta">
Read more →
</div>
</div>
</div>
</section>
Hope this helps!

calc() not working for 100% high bootstrap accordion in a fixed div

I am making a feed page in bootstrap. Left section is the feed list and right section is the feed details area. I have made feed details section fixed so when scrolling down the list, the feed details always shows to the right.
The Feed details section is made of:
1. Feed Details: calc(100% - 80px)
2. Comments: calc(100% - 80px)
3. post comment (height: 80px)
The problem is '1' and '2' above are two tabs of an accordion. and i want at least one of them to be open at any given time. thats done.
also if the content is small like no comments, i want the comments section to take up all the available space. but if the content is too much i have set the content overflow to slider.
in my particular case if the window is maximized in firefox, if i give the panel body of '1' to min-height:390px; and max-height:390px; all goes well but of course with different window size the accordion starts merging with the form below.
here is the code:
<!-- right section : Feed Details -->
<div class="col-md-5">
<div id="feed-detail">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="icon ion-android-list"></i>
Feed Details
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<h4>Waqar Younis steps down as Pakistan coach</h4>
<p>Description of the feed if any. consectetur adipisicing elit. Neque aut amet, alias consectetur voluptatibus aliquid dicta deleniti cupiditate! Officiis nulla, rem nobis sequi cupiditate incidunt magni itaque repudiandae quidem autem quisquam corporis, quod, enim perspiciatis.</p>
<ul class="list-inline">
<li><i class="icon ion-eye"></i> Seen by: <strong>6</strong></li>
<li><i class="icon ion-android-share"></i> Shared with: <strong>All Groups</strong></li>
</ul>
<ul class="list-inline feed-gallery">
<li><img src="images/waqar-1.jpg" class="img-thumbnail"></li>
<li><img src="images/waqar-2.jpg" class="img-thumbnail"></li>
<li><img src="images/waqar-3.jpg" class="img-thumbnail"></li>
</ul>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingTwo">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<i class="icon ion-android-textsms"></i>
View all 34 comments
</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body" id="feed-comments">
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini-2.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Julia Roberts
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Frank Allen
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini-4.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Mark Henry
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini-3.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Cathy Pacific
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini-4.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Samatha Auguelera
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>George Cloony
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini-2.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Brad Pittsburg
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
<div class="media">
<div class="media-left pull-left">
<a href="#">
<img class="media-object" src="images/avatar-mini.jpg" alt="...">
</a>
</div>
<div class="media-body">
<h4>Hammad
<span class="pull-right">2 min ago</span>
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti numquam vel totam! Autem porro culpa alias dolorem tempore deserunt sed earum, minus labore nemo ea!</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12 comment-control" style="">
<div class="input-group">
<input type="text" class="form-control" placeholder="Post your comment">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Post!</button>
</span>
</div><!-- /input-group -->
</div>
</div>
</div>
Here is the CSS:
<style>
#feed-detail{
width: 420px; height: calc(100% - 100px);position: fixed;background: #333;
}
#feed-detail .panel-body h4{font-weight: 700;font-size: 18px; color: #666; font-family: 'Montserrat', sans-serif; margin-top: 0;}
.form-control:focus, #focusedInput {border: none;}
.comment-control {position:absolute; bottom:0; padding:3px;}
.comment-control input[type=text]{ height:auto; line-height: 30px;}
.comment-control button{ padding: 11px; background: #f8f8f8; border-radius: 0;border: none;}
.comment-control button:hover{background: #f6f6f6; color:#333; border: none;}
.comment-control input[type="text"]::-webkit-input-placeholder, .comment-control input[type="text"]:-moz-placeholder, .comment-control input[type="text"]::-moz-placeholder, .comment-control input[type="text"]:-ms-input-placeholder
{ color: #ccc; }
#feed-detail .panel{background: #eee; border-radius: 0 !important;}
#feed-detail .panel .panel-heading{background: none; border-radius: 0 !important;}
#feed-detail .panel .panel-heading:hover{background: rgba(0,0,0,0.05);
border-radius: 0 !important;}
/*--------- Here i need the calc(100%-80px) in working order ---------*/
#feed-detail .panel-body{
min-height: 390px;
max-height: 390px;
overflow-y: scroll;
}
#feed-detail .panel-body li{margin-right: 20px;}
#feed-comments .media-body h4{font-size: 14px; margin: 0; margin-bottom: 10px;}
#feed-comments .media-body h4 span{font-size: 12px; font-weight: 400;}
#feed-detail ul.feed-gallery li img{height: 80px; width: auto; border-radius: 0; background-color: #eee;}
#feed-detail ul.feed-gallery li img:hover{background-color: #fff;}
#feed-detail ul.feed-gallery li {margin: 0 2px 2px 0; padding:0;}
#feed-detail i {font-size: 1em; margin-right: 5px;vertical-align: middle;line-height: 6px;}
.people-options .bootstrap-select{margin-bottom: 0 !important;}
</style>
I have tried every combination, feels like i have hit a brick wall. Any help will be greatly appreciated. thanks in advance.
Imran
try to
element{
height:calc(100vh - 80px)
}