Position a div to the right side - css

I'm using Tailwind CSS and wish to float my div to the right-hand side. Here's the thing. I have a div of 100% width that is displayed as grid-cols-2. This means I have two divs inside the main div ( both sharing 50% width to make the complete 100%)
I'll add an image to it - please see it.
<div class="grid grid-cols-1 md:grid-cols-2 mt-10 mb-10 px-4 mx-auto">
<!-- Left Item -->
<div class="flex flex-col w-full text-left text-gray-800 dark:text-gray-200 p-4">
<h1 class="text-3xl md:text-4xl font-bold mb-4">About Project</h1>
<p class="">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce turpis ante, eleifend vitae turpis ultricies, eleifend ullamcorper ex. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam egestas, metus id tempor elementum, libero libero consectetur tortor, nec auctor odio purus eget urna. Ut iaculis hendrerit leo in fringilla. Fusce euismod arcu tortor, sed rhoncus quam semper et. Vestibulum facilisis gravida nisi a commodo. Aenean tempus accumsan lectus, eget dapibus felis aliquet vel. Donec aliquet massa quis augue ullamcorper posuere.
</p>
</div>
<!-- Right Item -->
<div class="flex flex-col md:w-1/2 text-gray-800 dark:text-gray-200 bg-slate-300 dark:bg-[#101313] rounded-md p-4">
<h1 class="text-3xl md:text-4xl font-bold md:text-right">Useful Data</h1>
<p class="max-w-md"></p>
</div>
</div>
I'm trying to make the second div ( the right item) half of it's initial 100% width.
I've tried using float to float the item to the right, but it's not working. Really, I'm not a CSS guy - Please help me.
Thanks.

Maybe you can try that instead of having 2 columns in the main div, you have 4 columns instead.
So your first div will start on line 1 and end in line 3 (this class specifies in which line starts and ends col-start-1 col-end-3),and your second div will start in line 4, and end in line 5 your code can look like this:
<div class="grid grid-cols-4">
<!-- Left Item -->
<div class=" col-start-1 col-end-3 flex flex-col w-full text-left text-gray-800 dark:text-gray-200 p-4 col-span-2">
<h1 class="text-3xl md:text-4xl font-bold mb-4">About Project</h1>
<p class="">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce turpis ante, eleifend vitae turpis ultricies, eleifend ullamcorper ex. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam egestas, metus id tempor elementum, libero libero consectetur tortor, nec auctor odio purus eget urna. Ut iaculis hendrerit leo in fringilla. Fusce euismod arcu tortor, sed rhoncus quam semper et. Vestibulum facilisis gravida nisi a commodo. Aenean tempus accumsan lectus, eget dapibus felis aliquet vel. Donec aliquet massa quis augue ullamcorper posuere.
</p>
</div>
<!-- Right Item -->
<div class="col-start-4 col-end-5 text-gray-800 dark:text-gray-200 bg-slate-300 dark:bg-[#101313] rounded-md p-4">
<h1 class="text-3xl md:text-4xl font-bold md:text-right">Useful Data</h1>
<p class="max-w-md"></p>
</div>
</div>

Related

Unable to get desired result from react slick

I was trying to implement React slick's multiple items carousel. The desired result is given below
but I want the center element to pop out a little just like
But I'm able to get this far
I want only three elements visible at a time and center element to be popped out. Here is my code.
import React, { Component } from 'react'
import Slider from "react-slick";
import DemoGuy from './DemoGuyMentors.png';
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
export class Stories extends Component {
render() {
const settings = {
className: "center",
centerMode: true,
infinite: true,
slidesToShow: 4,
speed: 500,
autoplay:true,
autoplayspeed:1000
};
return (
<div>
<div className="SliderWrapper">
<Slider {...settings}>
<div className="AchiversDetails">
<div className="MentorsPicAndLogoWrapper">
<img className="MentorImg" src={DemoGuy}></img>
</div>
<div className="MentorsDetailsWordWrapper">
<h3>Lorem ipppsum</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
pellentesque metus ligula, ac elementum
velit mollis in. Praesent ut dictum diam. Vivamus gravida eros at nunc
vehicula pulvinar. Aliquam erat volutpat.
Nulla suscipit bibendum quam quis pharetra. Aliquam odio leo, molestie eu
luctus fringilla, suscipit at ipsum.
</p>
</div>
</div>
<div className="AchiversDetails">
<div className="MentorsPicAndLogoWrapper">
<img className="MentorImg" src={DemoGuy}></img>
</div>
<div className="MentorsDetailsWordWrapper">
<h3>LOREM IPPSUM</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
pellentesque metus ligula, ac elementum
velit mollis in. Praesent ut dictum diam. Vivamus gravida eros at nunc
vehicula pulvinar. Aliquam erat volutpat.
Nulla suscipit bibendum quam quis pharetra. Aliquam odio leo, molestie eu
luctus fringilla, suscipit at ipsum.
</p>
</div>
</div>
<div className="AchiversDetails">
<div className="MentorsPicAndLogoWrapper">
<img className="MentorImg" src={DemoGuy}></img>
</div>
<div className="MentorsDetailsWordWrapper">
<h3>Lorem ipppsum</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Vestibulum pellentesque metus ligula, ac elementum
velit mollis in. Praesent ut dictum diam. Vivamus gravida eros at
nunc vehicula pulvinar. Aliquam erat volutpat.
Nulla suscipit bibendum quam quis pharetra. Aliquam odio leo,
molestie eu luctus fringilla, suscipit at ipsum.
</p>
</div>
</div>
<div className="AchiversDetails">
<div className="MentorsPicAndLogoWrapper">
<img className="MentorImg" src={DemoGuy}></img>
</div>
<div className="MentorsDetailsWordWrapper">
<h3>LOREM IPPSUM</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
pellentesque metus ligula, ac elementum
velit mollis in. Praesent ut dictum diam. Vivamus gravida eros at
nunc vehicula pulvinar. Aliquam erat volutpat.
Nulla suscipit bibendum quam quis pharetra. Aliquam odio leo,
molestie eu luctus fringilla, suscipit at ipsum.
</p>
</div>
</div>
<div className="AchiversDetails">
<div className="MentorsPicAndLogoWrapper">
<img className="MentorImg" src={DemoGuy}></img>
</div>
<div className="MentorsDetailsWordWrapper">
<h3>LOREM IPPSUM</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
pellentesque metus ligula, ac elementum
velit mollis in. Praesent ut dictum diam. Vivamus gravida eros at nunc
vehicula pulvinar. Aliquam erat volutpat.
Nulla suscipit bibendum quam quis pharetra. Aliquam odio leo, molestie eu
luctus fringilla, suscipit at ipsum.
</p>
</div>
</div>
</Slider>
</div>
</div>
)
}
}
export default Stories
Note: When I change the slideToShow:3. Only two elements are entirely visible and a half on both sides.
Following is the CSS I have used
.AchiversDetails{
box-shadow: 0px 4px 52px rgba(70, 74, 140, 0.24);
padding: 3rem;
border-radius: 2%;
}
.slick-slide {
margin: 27px 27px;
}
.slick-list {
margin: 0 -27px;
}
Rest of the classed doesn't hold any css properties.
The desired final output is
I can implement the css which is inside the box. But its the slider I'm unable to implement.
centerMode does not work correctly unless you use an odd value for the slidesToShow setting. You should be able to tweak the padding between slides with the centerPadding option instead of your slick-slide and slick-list CSS.
const settings = {
className: "center",
centerMode: true,
centerPadding: '60px',
infinite: true,
slidesToShow: 3,
speed: 500,
autoplay:true,
autoplayspeed:1000
};
To get your center slide to be larger than the others, you can target it with CSS and scale it up:
.slick-center .AchiversDetails {
transform: scale(1.2);
}

Bootstrap Card Padding Without Exceeding Borders

I'm working on a web app which will work on a 800 x 480 pixel screen on full screen mode.
My App is single page app using ReactJS and it has a simple Navigation Bar at top, and 4 Bootstrap Card with 2x2 arrangement.
Code is like:
<div class="nav-bar">Component</div>
<div class="card-deck">
<div class="card-body"> Something-1</div>
<div class="card-body"> Something-2</div>
</div>
<div class="card-deck">
<div class="card-body"> Something-3</div>
<div class="card-body"> Something-4</div>
</div>
Problem is that, Something-3 and Something-4 cards has something in them(!) which exceeds my 480 px limit. Is there any solution that changes the tightness of card without changing margins and padding of the ingredients of card?
The problem is that your .card-body classes come directly under your .card-deck class; you're missing the core .card class in between.
Your .card-deck should contain multiple .card elements, which are the core Bootstrap cards themselves. These .card elements contain the .card-body (which in turn usually contain the classes .card-title and .card-text).
If set up correctly, it doesn't matter how much content a card has in it; it will simply overflow to contain it.
This can be seen in the following:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<div class="card-deck">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus convallis auctor accumsan. Cras eu purus quis dui tempus finibus. Quisque et suscipit mi. Mauris maximus nisi vitae blandit interdum. Etiam interdum felis nec sapien tristique, nec sollicitudin urna ornare. Integer magna orci, scelerisque at fermentum nec, tempor id purus. Phasellus suscipit tempus odio, sit amet aliquam arcu varius at. Sed rutrum pellentesque tortor, id pharetra ante euismod nec. </p>
</div>
</div>
<div class="card">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus convallis auctor accumsan. Cras eu purus quis dui tempus finibus. Quisque et suscipit mi. Mauris maximus nisi vitae blandit interdum. Etiam interdum felis nec sapien tristique, nec sollicitudin urna ornare. Integer magna orci, scelerisque at fermentum nec, tempor id purus. Phasellus suscipit tempus odio, sit amet aliquam arcu varius at. Sed rutrum pellentesque tortor, id pharetra ante euismod nec. </p>
</div>
</div>
</div>

Bootstrap - Columns overlap each other

I am trying to achieve the following layout:
I have been able to do this more or less with two issues:
The columns overlap with the image
The circles are not centered. Moreover when I see this on the mobile, amongst other issues, the two circles stack on top of each other.
Here's my HTML:
<div class="container"> <!-- can't change this -->
<div class="col-md-8 column"> <!-- can't change this -->
<!-- can change anything below this -->
<div class="row">
<div class="col-md-3">
<img alt="Some Image" src="http://lorempixel.com/340/340/" />
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-12">
<p>
Lorem ipsum dolor sit amet
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="circle">450
<br> reviews </div>
<div class="circle">4.2 million
<br> readers </div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>
Lorem ipsum dolor sit amet
</p>
</div>
</div>
</div>
</div>
Live Demo
Please help resolve these issues.
It doesn't necessarily overlaps, in this particular case, simply give the image img-responsive class so the width of the image is always at max 100%.
To solve the circle issues, you can put them inside a col-xs-6 so they don't stack on top of each other.
Here is a demo: https://codepen.io/anon/pen/WMEMbW
<div class="container">
<!-- can't change this -->
<div class="col-md-8 column">
<!-- can't change this -->
<!-- can change anything below this -->
<div class="row">
<div class="col-md-3">
<img alt="Some Image" src="http://lorempixel.com/340/340/" class="img-responsive" />
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-12">
<p>
Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>. Aliquam eget sapien sapien. Curabitur in metus urna. In hac habitasse platea dictumst. Phasellus eu sem sapien, sed vestibulum velit. Nam purus nibh, lacinia non faucibus et, pharetra in dolor. Sed iaculis posuere diam ut cursus. <em>Morbi commodo sodales nisi id sodales. Proin consectetur, nisi id commodo imperdiet, metus nunc consequat lectus, id bibendum diam velit et dui.</em> Proin massa magna, vulputate nec bibendum nec, posuere nec lacus. <small>Aliquam mi erat, aliquam vel luctus eu, pharetra quis elit. Nulla euismod ultrices massa, et feugiat ipsum consequat eu.</small>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="center-block">
<div class="col-xs-6">
<div class="circle">450
<br> reviews
</div>
</div>
<div class="col-xs-6">
<div class="circle">4.2 million
<br> readers
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>
Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>. Aliquam eget sapien sapien. Curabitur in metus urna. In hac habitasse platea dictumst. Phasellus eu sem sapien, sed vestibulum velit. Nam purus nibh, lacinia non faucibus et, pharetra in dolor. Sed iaculis posuere diam ut cursus. <em>Morbi commodo sodales nisi id sodales. Proin consectetur, nisi id commodo imperdiet, metus nunc consequat lectus, id bibendum diam velit et dui.</em> Proin massa magna, vulputate nec bibendum nec, posuere nec lacus. <small>Aliquam mi erat, aliquam vel luctus eu, pharetra quis elit. Nulla euismod ultrices massa, et feugiat ipsum consequat eu.</small>
</p>
</div>
</div>
</div>
</div>
I guess you should be using the help of some media queries as well.
Have made some changes to the demo you shared.
Updated Demo
CSS
.circle {
display: inline-flex;
justify-content: center;
align-items: center;
text-align: center;
margin-right: 10px;
width: 200px;
height: 200px;
font-size: 35px;
border-radius: 50%;
color: #fef;
background: #000
}
.img-left {
max-width: 100%;
}
.circle-wrapper {
text-align: center;
}
#media (max-width:500px) {
.circle-wrapper .circle{
width: 150px;
height: 150px;
font-size: 25px;
}
}
HTML:
<div class="container"> <!-- can't change this -->
<div class="col-md-8 column"> <!-- can't change this -->
<!-- can change anything below this -->
<div class="row">
<div class="col-md-3">
<img class="img-left" alt="Some Image" src="http://lorempixel.com/340/340/" />
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-12">
<p>
Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>. Aliquam eget sapien sapien. Curabitur in metus urna. In hac habitasse platea dictumst. Phasellus eu sem sapien, sed vestibulum velit. Nam purus nibh, lacinia non faucibus et, pharetra in dolor. Sed iaculis posuere diam ut cursus. <em>Morbi commodo sodales nisi id sodales. Proin consectetur, nisi id commodo imperdiet, metus nunc consequat lectus, id bibendum diam velit et dui.</em> Proin massa magna, vulputate nec bibendum nec, posuere nec lacus. <small>Aliquam mi erat, aliquam vel luctus eu, pharetra quis elit. Nulla euismod ultrices massa, et feugiat ipsum consequat eu.</small>
</p>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="row circle-wrapper">
<div class="circle">450
<br> reviews </div>
<div class="circle">4.2 million
<br> readers </div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>
Lorem ipsum dolor sit amet, <strong>consectetur adipiscing elit</strong>. Aliquam eget sapien sapien. Curabitur in metus urna. In hac habitasse platea dictumst. Phasellus eu sem sapien, sed vestibulum velit. Nam purus nibh, lacinia non faucibus et, pharetra in dolor. Sed iaculis posuere diam ut cursus. <em>Morbi commodo sodales nisi id sodales. Proin consectetur, nisi id commodo imperdiet, metus nunc consequat lectus, id bibendum diam velit et dui.</em> Proin massa magna, vulputate nec bibendum nec, posuere nec lacus. <small>Aliquam mi erat, aliquam vel luctus eu, pharetra quis elit. Nulla euismod ultrices massa, et feugiat ipsum consequat eu.</small>
</p>
</div>
</div>
</div>
</div>

Unable to set bottom margin in a div bootstrap

I'm trying to set a bottom margin to the div with the class "thisrow" but couldn't get it working. Basically, i want that row to be at the bottom (footer) of the card.
here's the code:
<div class="leftbar" style="margin-top:10px;">
<div class="row">
<div class="col-md-4">
<div style="background:#ffc016; height:150px;">
<div class="text-center">
Company Name
</div>
</div>
</div>
<div class="col-md-8">
<div class="row">
<div class="col-md-10">
<h4>Summer Communication Intern</h4>
</div>
<div class="col-md-2 text-right heart"><span class="glyphicon glyphicon-heart-empty"></span></div>
</div>
<div class="row">
<div class="col-md-3"><small>Nike Inc</small></div>
<div class="col-md-3"><small>England</small></div>
<div class="col-md-3"><small>Internship</small></div>
<div class="col-md-3"><small> </small></div>
</div>
<div class="row thisrow">
<div class="col-md-2"> </div>
<div class="col-md-10 text-right heart">
<div class="btn-group" role="group" aria-label="...">
<span class="btn btn-default monthly"><small>Save</small></span>
<a class="btn btn-default applynow">View</a>
</div>
</div>
</div>
</div>
</div>
</div>
http://i.stack.imgur.com/6KEpg.png
In my experience, positioning something at the bottom right is best done by postioning it absolute. This is by far the easiest and most 'dynamic' way of doing this. The css is not that hard:
.leftbar {
position: relative;
}
.bottom-right {
position: absolute;
bottom: 0;
right: 15px; /* == padding of .row in TB3 */
}
This does require you to move that button group directly into the .leftbar, so it uses the correct element to position against. This is nessecary since a .col gets postion relative by default in TB3.
I went ahead and cleaned up your HTML while I was at it. There where a lot of elemnts in there that are not required, as you can see. The result of the markup below should be the same as your code,and is a lot cleanier and easier to understand imo:
<div class="leftbar row" style="margin-top:10px;">
<div class="col-xs-4 text-center" style="background:#ffc016; height:150px;">
Company Name
</div>
<div class="col-xs-8">
<a href="#" class='pull-right'>
<i class="glyphicon glyphicon-heart-empty"></i>
</a>
<h4>Summer Communication Intern</h4>
<ul class="row">
<li class="col-xs-3">
<small>Nike Inc</small>
</li>
<li class="col-xs-3">
<small>England</small>
</li>
<li class="col-xs-3">
<small>Internship</small>
</li>
</ul>
</div>
<div class="btn-group bottom-right" role="group" aria-label="...">
<span class="btn btn-default monthly">
<small>Save</small>
</span>
<a class="btn btn-default applynow">
View
</a>
</div>
</div>
and a demo: http://jsfiddle.net/2tg55z5n/
(note that I changed your col classes to xs just so they would show up in that small fiddle panel, you can just as easy change them back to md of course)
Try setting margin to the button division
<div class="btn-group" role="group" aria-label="..." style="margin-top:_px">
<span class="btn btn-default monthly"><small>Save</small></span>
<a class="btn btn-default applynow">View</a>
</div>
I think you should use an additional container to get your buttons together with the bottom part.
see here for an example of working with containers
Containers example
Bootstrap 3 Container Examples and Common Misuse
View in Desktop mode
Demo by scotch.io
Rows are orange
Toggle Padding to help visualize even more
<main>
<section id="with-container-example">
<h2>With Container</h2>
<div class="container">
<div class="row">
<p class="absolute-example">
This is positioned-absolute, relative to the row to help visualize
</p>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
</div>
</div>
</section>
<section id="with-no-container">
<h2>With No Container</h2>
<div class="row">
<p class="absolute-example">
This is positioned-absolute, relative to the row to help visualize
</p>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
</div>
</section>
<section id="with-container-fluid">
<h2>With Container-Fluid</h2>
<div class="container-fluid">
<div class="row">
<p class="absolute-example">
This is positioned-absolute, relative to the row to help visualize
</p>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
<div class="col-xs-4">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis est eget tristique vestibulum. Fusce et pulvinar erat, id viverra sem. Vivamus porttitor, sapien nec mattis fermentum, sem augue ornare erat, vitae interdum ante sapien id libero. Vestibulum luctus augue pretium purus posuere.
</div>
</div>
</div>
</section>
</main>

Bootstrap: Getting an image to resize to 100% height in uneven 2 column layout

http://jsfiddle.net/dq5T5/
The fiddle above shows the problem.
Since the row has a white background, there ends up being empty space under the image when the browser window is resized.
I just want the image to fill the entire height of the left column, but I also need it to stack vertically as it currently does (responsive).
<body>
<div class="widereport">
<div class="col-md-4 no-gutters">
<figure class="animated-overlay overlay-alt">
<img class="img-responsive" width="640" height="400" alt="img alt" src="http://placehold.it/600x450" itemprop="image">
<a title="image" href="/"></a>
<figcaption>
<div class="thumb-info thumb-info-alt">
<i class="ss-navigateright"></i>
</div>
</figcaption>
</figure>
</div>
<div class="col-md-8">
<h5 class="portfolio-subtitle" itemprop="alternativeHeadline">mini menta | March 2014</h5>
<h3 class="portfolio-item-title mt0" itemprop="name headline">
Title here
</h3>
<p class="itemdeets">85 Pages</p>
<div class="portfolio-item-excerpt" itemprop="description">
<p class="mb9">Sed non orci sed ante dignissim aliquam. Fusce in sapien leo. Praesent justo nibh, dapibus eu fermentum sit amet, rutrum sit amet nunc. Aliquam augue. Vestibulum ante ipsum primis in fauc ibus orci luctus et ultrices posuere cubilia Curae; Integer in enim dui. Suspendisse potenti. Sed placerat pellentesque nibh ut varius. Morbi aliquet nulla at sem consequat eleifend. Sed non orci sed ante dignissim aliquam. Fusce in sapien leo. Praesent justo nibh, dapibus eu fermentum sit amet, rutrum sit amet nunc. Aliquam augue. Sed placerat pellentesque nibh ut varius. Morbi aliquet nulla at sem consequat eleifend. Sed placerat pellentesque nibh ut varius. Morbi aliquet nulla at sem consequat eleifend. Sed placerat pellentesque nibh ut varius. Morbi aliquet nulla at sem consequat eleifend.</p>
</div>
<p>
<span class="text pull-right mb9">More Information</span>
</p>
</div>
</div>
</body>
Try adding the below in the class for img-responsive in the CSS:
.img-responsive {
height: 100%;
width: 100%;
}
Fiddle

Resources