Image overlay doesn't fit - css

I've a problem with image overlay.
Code is here: https://codepen.io/r-smal/pen/BOBdmX
<section class="team">
<h2 class="team__title">team</h2>
<div class="team__wrapper container__team ">
<div>
<div class="team__card ">
<div class="team__overlay"></div>
<img class="team__img" src="https://i.imgur.com/vWIuUtd.jpg" alt="mako">
</div>
<h3 class="team__description">lorem</h3>
<p class="team__span">ipsum</p>
</div>
<div>
<div class="team__card ">
<div class="team__overlay"></div>
<img class="team__img" src="https://i.imgur.com/vWIuUtd.jpg" alt="mako">
</div>
<h3 class="team__description">lorem</h3>
<p class="team__span">ipsum</p>
</div>
<div>
<div class="team__card ">
<div class="team__overlay"></div>
<img class="team__img" src="https://i.imgur.com/vWIuUtd.jpg" alt="mako">
</div>
<h3 class="team__description">lorem</h3>
<p class="team__span">ipsum</p>
</div>
</section>
.container__team {
max-width: 1700px;
margin: 0 auto;
}
.team {
&__title {
margin: 100px;
text-align: center;
font-size: 30px;
text-transform: uppercase;
position: relative;
&::after{
content: "";
position: absolute;
width: 85px;
border-bottom: solid 3px #5dc6e8;
left: 48.5%;
top: 50px;
}
}
&__wrapper {
display: grid;
grid-template-columns: 33.33% auto auto;
text-align: center
}
&__description {
margin: 50px 0 20px;
text-align: center;
font-size: 35px;
}
&__span{
font-size: 35px;
text-align: center;
}
&__card {
position: relative;
}
&__overlay {
position: absolute;
background: rgba(0,0,0,0.6);
width: 100%;
height: 100%;
display: none;
}
&__img{
}
}
.team__card:hover .team__overlay{
display: block;
transition: 0.3s;
}
As you can see on codepen overlay on top of image is bigger than my image and I can't figure out why. I made it 'fit" but I have to use static margins so in resoult in mobile version it doesn't look right.
And one last question how do I position ::after element center under my text that will stay here even in mobile?Without using static margin like in my code.

Related

How to create a css vertical line with circles and text on side in reactjs?

Hi I have been trying to create something as showing in the image below but I do not know if my way of doing is correct or not, if not could you please correct me.
Thanks
please see the code I have tried:
<Box className="education-details">
<div className="circle"> </div>
<div className="not-circle">
<p className="education-degree">masters</p>
<p className="education-year"> 2017/2019</p>
<p className="education-location">Dublin business school</p>
</div>
<div className="circle"> </div>
<div className="not-circle">
<p className="education-degree">masters</p>
<p className="education-year"> 2017/2019</p>
<p className="education-location">Dublin business school</p>
</div>
<div className="circle"> </div>
<div className="not-circle">
<p className="education-degree">masters</p>
<p className="education-year"> 2017/2019</p>
<p className="education-location">Dublin business school</p>
</div>
</Box>
the CSS part
.education-details {
box-sizing: border-box;
}
.circle {
width: 17px;
height: 17px;
background-color: rgb(255, 0, 0);
border-radius: 50%;
margin-left: -1.75%;
position: absolute;
}
.not-circle {
/* margin-top: -30px;
margin-left: 1.5vw; */
}
The result
codesand box link
Finally, as your question was quite interesting, I played with codepen.io to create something similar to your original picture. I reduced a bit the HTML content like I mentionned in my comment as I prefer using pseudo-elements when possible for graphical concerns.
The HTML sementic could be improved by the use of <section>, <ul> and <li> elements also. In my proof of concept I just used <div> elements. I also prefered using <h2>, <h3> and <time> tags instead of ordinary <p> tags.
You can play with my codepen here: https://codepen.io/patacra/pen/wvperjL
You can see it here after SCSS was compiled to CSS:
html, body {
margin: 0;
position: relative;
}
html {
background-color: #f6f6f6;
}
html::before {
content: "";
display: block;
position: absolute;
z-index: -1;
border-radius: 50%;
background-color: #ffebeb;
top: 8em;
right: -8em;
width: 15em;
height: 15em;
}
body {
padding: 1em;
font-family: Arial, sans serif;
font-size: 14px;
}
body::before, body::after {
content: "";
display: block;
position: absolute;
z-index: -1;
border-radius: 50%;
background-color: #ffebeb;
}
body::before {
top: -10em;
left: -15em;
width: 25em;
height: 30em;
}
body::after {
top: -12em;
right: -12em;
width: 25em;
height: 25em;
}
.timelines {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: flex-start;
}
.timeline-title {
font-size: 1em;
font-weight: bold;
}
.timeline-item {
margin-bottom: 2em;
}
.timeline-item h3 {
font-size: 1em;
font-weight: bold;
text-transform: uppercase;
margin: 0;
position: relative;
}
.timeline-item h3::before {
content: "";
position: absolute;
left: -2.35em;
background-color: #fe4747;
width: 0.7em;
height: 0.7em;
border-radius: 50%;
transform: translate(-0.5px, 0.2em);
}
.timeline-items {
margin: 2em;
padding: 0.01em 0 3em 2em;
border-left: 1px solid #fe4747;
}
.timeline-item {
margin-top: -0.3em;
}
.timeline-item time {
display: block;
float: left;
background-color: #ffebeb;
padding: 0.2em 0.4em;
}
.timeline-item > * {
margin: 1em 0;
}
.timeline-item .location {
clear: both;
font-size: 0.85em;
font-style: italic;
}
<div class="timelines">
<div class="timeline education">
<h2 class="timeline-title">Education</h2>
<div class="timeline-items">
<div class="timeline-item">
<h3>Master of Science in information systems with computing</h3>
<time datetime="2017/2019">2017 – 2019</time>
<div class="location">Dublin Business School, Dublin, Ireland</div>
</div>
<div class="timeline-item">
<h3>Bachelor of electrical engineering</h3>
<time datetime="2011/2016">2011 – 2016</time>
<div class="location">North Maharashtra University, Jalgaon, India</div>
</div>
<div class="timeline-item">
<h3>Boys town public school</h3>
<time datetime="2009/2010">2009 – 2010</time>
<div class="location">Dublin Business School, Dublin, Ireland</div>
</div>
</div>
</div>
<div class="timeline experience">
<h2 class="timeline-title">Experience</h2>
<div class="timeline-items">
<div class="timeline-item">
<h3>Sofware developer</h3>
<time datetime="2020/2022">2020 – Present</time>
<div class="location">Kare, Newbridge, Ireland</div>
</div>
<div class="timeline-item">
<h3>Junior developer</h3>
<time datetime="2019/2020">2017 – 2019</time>
<div class="location">Unipupil limited, Dublin, Ireland</div>
</div>
<div class="timeline-item">
<h3>Junior developer</h3>
<time datetime="2015/2017">2017 – 2019</time>
<div class="location">Dublin Business School, Dublin, Ireland</div>
</div>
</div>
</div>
</div>

I have a nav bar but the link sends the content below the sticky header. What can I do so the content remains visible using CSS only?

This is the HTML. I need the header to be visible all the time, but when I click the link in the nav bar, the content goes below the sticky header. Can I solve this ussing only CSS? I have tried several solutions but none of them seems to work, perhaps because I use a header wraping another header.
'''<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap"
rel="stylesheet">
<header id="header" class="header-outer"><div class= "header-logo"><a><img alt="img"
id="header-img" class= "smaller-image img " src=
https://logopond.com/logos/4797fa121d6d6c33b9d7d4411b994aa8.png
https://farm4.static.flickr.com/3071/2371922778_c1634f19e2.jpg?v=0></a></div>
<div class="header-inner responsive-wrapper">
<div>
<h1>Le Librairie du Parthénon</h1>
</div>
<nav class="header-navigation">
<ul>
<li><a class= "nav-link" href="#catalogo">Catalogo</a></li>
<li><a class= "nav-link" href="#ejemplares-raros">Raros</a></li>
<li><a class= "nav-link" href="#ejemplares-unicos">Unique</a></li>
</ul>
</nav>
</div>
</header>
<main>
<div class="box content-box">
<div class="black-box">
<section id="catalogo">
<div class="desc">
<h2 class="dark-red">Catalogo de libros</h2>
<p>Nuestro catalogo tiene una amplia colección de ejemplares antiguos y poco comunes</p>
</div>
</section>
</div>
<div class="container">
<section id="ejemplares-raros">
<div class="desc">
<h2 class="dark-red">Ejemplares raros</h2>
<p>Libros extremadamente raros y difíciles de encontrar</p>
</div>
</section>
</div>
<div class="container">
<section id="ejemplares-unicos">
<div class="desc">
<h2 class="dark-red">Ejemplares únicos</h2>
<p>Libros únicos e invaluables</p>
</div>
</section>
</div>
<div>
<p>Los libros malditos mas peligrosos de la historia</p>
<iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/eZIjIWbEZdk"
title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write;
encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<div>
<form action="https://www.freecodecamp.com/email-submit" id="form">
<input name="email" id="email" type="email" placeholder="email"/>
<input id="submit" type="submit"/>
</form>
</div>
</div>
</main>'''
This is the CSS. You can see the header inner an header outer yha I use to make the header change size when you scroll down the page. The problem is that when I click a link in the nav bar the content goes below the header and it is not visible. I am a begginer and I would like to find a solution with CSS only, I already tried several solutions but anything seems to work.
'''#media (min-width: 576px;)
nav {
margin-top: 10px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 0 50px;
color: rgb(143,55,36);
}
body {
padding: 0;
margin: 0;
}
.smaller-image {
width:150px;
}
header {
display:flex;
position: fixed;
top:0;
left:0;
bottom:10;
width:100%;
}
.header-outer {
display: flex;
align-items: center;
position: sticky;
height: 120px;
margin: 0;
top: -50px;
background-color: rgb(153,0,0);
box-shadow: 0 2px 10px 0 rgba(0,0,0, 0.1);
}
.header-inner {
height: 70px;
position: sticky;
margin:0;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: space-between
}
.header-logo img {
display: block;
height: 70px;
}
.header-navigation {
display: flex;
flex-wrap: wrap;
}
.responsive-wrapper {
width: 90%;
max-width: 1280px;
margin-left: auto;
margin-right: auto;
}
nav > ul {
width: 35vw;
display: flex;
flex-direction: row;
justify-content: space-around;
font-weight: 400;
font-size: 22px;
color: silver;
}
ul {
color: rgb(123,55,36);
}
a {
color: rgb(21,5,11);
}
[type= "submit"] {
padding: 15px;
margin: 15px;
display: flex;
}
.box {
border-style: solid;
border-color: rgb(21,72,82);
border-width: 5px;
background-color: rgb(82,32,21);
color: rgb(21,72,82);
padding: 10px;
}
.second-box {
border-style: solid;
border-color: rgb(21,72,82);
border-width: 5px;
background-color: rgb(82,32,21);
color: rgb(21,72,82);
padding: 10px;
}
.black-box {
background-color: #292929;
padding: 30px;
margin-top: 85px;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
.content-box {
box-sizing: content-box;
}
main {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 180px;
margin-right: 150px;
}
.padding {
padding-top: 170px;
}'''

Resize the header and content div dimensions respond when the window size changes but maintain right sidebar dimensions

I am trying to use a flexbox approach to create a layout that will resize the header width and content dimensions when a window is resized, but maintain the sidebar dimensions.
I found the following example from this Flexbox Approach to get me started, and it works as desired for the content div itself. But after looking it over, I'm unsure how to make it work as described with a fixed width, 100% height sidebar.
CSS from example:
<style>
html, body {
height: 100%;
margin: 0
}
.box {
display: flex;
flex-flow: column;
height: 100%;
}
.box .row {
border: 1px dotted grey;
}
.box .row.header {
flex: 0 1 auto; /* The above is shorthand for: flex-grow: 0, flex-shrink: 1, flex-basis: auto */ }
.box .row.content {
flex: 1 1 auto;
}
.box .row.footer {
flex: 0 1 40px;
}
</style>
HTML from example:
<div class="row header">
<p><b>header</b> <br /> <br />(sized to content)</p>
</div> <div class="row content">
<p> <b>content</b> (fills remaining space) </p>
</div>
<div class="row footer">
<p><b>footer</b> (fixed height)</p>
</div>
</div>
The following codepen example gave me the information I needed to get my layout working:
http://codepen.io/JosephSilber/pen/HqgAz
CSS:
.header {
height: 50px;
}
.body {
position: absolute;
top: 50px;
right: 0;
bottom: 0;
left: 0;
display: flex;
}
.sidebar {
width: 140px;
}
.main {
flex: 1;
display: flex;
flex-direction: column;
}
.content {
flex: 1;
display: flex;
overflow: auto;
}
.box {
min-height: -webkit-min-content;
display: flex;
}
.column {
padding: 20px;
border-right: 1px solid #999;
}
.column > div {
height: 2000px;
background: red;
}
.column:nth-child(2) > div {
height: auto;
}
/* All of these are just for this demo's design. */
body {
font-family: sans-serif;
font-size: 20px;
line-height: 50px;
text-transform: uppercase;
font-weight: bold;
}
.header {
text-align: center;
color: #fff;
background: #444;
}
.sidebar {
background: #666;
padding: 4px 20px;
color: #fff;
}
.page-header {
padding: 6px 20px;
background: #004141;
color: #fff;
font-size: .8em;
}
.content {
background: #ddd;
}
HTML:
<div class="header">Main header</div>
<div class="body">
Move this: <div class="sidebar">Sidebar</div>
<div class="main">
<div class="page-header">Page Header. Content columns are below.</div>
<div class="content">
<div class="box">
<div class="column">
<div>Column 1</div>
</div>
<div class="column">
<div>Column 1</div>
</div>
<div class="column">
<div>Column 1</div>
</div>
</div>
</div>
</div>
To here: <div class="sidebar">Sidebar</div>
</div>
To get the sidebar on the right side, I simply moved <div class="sidebar">Sidebar</div>to just above the closing div tag for the .body class.

Trying to arrange images using css

Here is the code I am using so far. I have 6 images that I am trying to arrange and make responsive as well.
Idea is like this
image -blank space - image
image -----blank space -----image
image -blank space - image
When I squeeze the page they do not end up stacked uniformly on top of each other. The spaces need to go away so all I have is 6 images on top of each other. CSS below followed by html
.row:after {
content: "";
clear: both;
display: table;
}
/** North Scottsdale */
.nsdl {
float: left;
margin: 0 175px;
padding: 0 0px;
width: 300px;
height: 200px;
border: 3px solid white;
background-image: url("/images/dphotos/test2a.png");
}
/** break1 */
.break1 {
float: left;
margin: 0px;
padding: 0px;
width: 95px;
height: 200px;
border: 3px solid white;
}
/** Scottsdale */
.sdl {
float: left;
margin: 0px;
padding: 10px;
width: 300px;
height: 200px;
border: 3px solid white;
background-image: url("/images/dphotos/test2a.png");
}
/** Tempe */
.tmpe {
float: left;
margin: 0 35px;
padding: 10 10px;
width: 300px;
height: 200px;
border: 3px solid white;
background-image: url("/images/dphotos/test2a.png");
}
/** break2 */
.break2 {
float: left;
margin: 10px;
padding: 10px;
width: 475px;
height: 200px;
border: 3px solid white;
}
/** Downtown */
.dtown {
float: left;
margin: 10px;
padding: 10px;
width: 300px;
height: 200px;
border: 3px solid white;
background-image: url("/images/dphotos/test2a.png");
}
/** West Side */
.wside {
float: left;
margin: 0 175px;
padding: 0 0px;
width: 300px;
height: 200px;
border: 3px solid white;
background-image: url("/images/dphotos/test2a.png");
}
/** break1 */
.break3 {
float: left;
margin: 0px;
padding: 0px;
width: 95px;
height: 200px;
border: 3px solid white;
}
/** UPTOWN */
.utown {
float: left;
margin: 0 120px;
padding: 10 10px;
width: 300px;
height: 200px;
border: 3px solid white;
background-image: url("/images/dphotos/test2a.png");
}
<div class="w3-container">
<div class="row">
<div class="left">
<div class="nsdl" style="text-align: center;">
<h2> NORTH SCOTTSDALE</h2>
</div>
</div>
<div class="center"> </div>
<div class="right">
<div class="sdl" style="text-align: center;">
<h2>SCOTTSDALE</h2>
</div>
</div>
</div>
<div class="row">
<div class="left">
<div class="tmpe" style="text-align: center;">
<h2>TEMPE</h2>
</div>
</div>
<div class="center"> </div>
<div class="right">
<div class="dtown" style="text-align: center;">
<h2>DOWNTOWN</h2>
</div>
</div>
<div class="left">
<div class="wside" style="text-align: center;">
<h2>WEST SIDE</h2>
</div>
</div>
<div class="center"> </div>
<div class="right">
<div class="utown" style="text-align: center;">
<h2>UPTOWN</h2>
</div>
</div>
</div>
</div>
I would suggest looking at a number of frameworks like Bootstrap, Skeleton and Zurb Foundation and use their CSS grid components. Look into how they control the size of various page regions with media queries using a mobile first approach.
You can definitely roll your own solution too. Here's an example.
<div class="img-group">
<div class="img-holder">
<img src="http://placehold.it/300x300?text=1">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=2">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=3">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=4">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=5">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=6">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=7">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=8">
</div>
<div class="img-holder">
<img src="http://placehold.it/300x300?text=9">
</div>
</div>
.img-group img {
display: block;
max-width: 100%;
}
.img-holder {
float: left;
width: 50%;
}
#media ( min-width: 448px ) {
.img-holder {
width: 33.333%;
padding: 0.75%;
}
}
#media ( min-width: 779px ) {
.img-holder {
box-sizing: border-box;
width: 25%;
padding: 2%;
}
}
Demo JSFiddle.
First you make your images responsive. The simplest version of doing so is setting them to display: block; and max-width: 100%;. Setting the max width means they'll try to take up their parent element's width as long as they don't exceed their own intrinsic width. For example, if the parent element is 700px wide and the image is 600px wide, it won't stretch to fit the 700px of space. It will stop at 600px.
Now you place your images in container elements that you'll control with media queries. Use percentage widths (i.e. width: 25%; ) so they stay nice and fluid.
You might be wondering what box-sizing: border-box; does. It says that padding should be included as a part of your width definition. Normally if you have width: 25%; padding: 1%; the total width of your element would be 27% as 1% + 25% + 1% = 27%.

Can I readjust Bootstrap Column spans without JS?

I know this is probably totally against the whole idea of the grid system and the responsiveness but let's just assume I want to do the following anyway:
I have the layout that you can see in the picture below.
The problem is initially the whole image+text part takes col-md-9 and the twitter feed takes col-md-2 span on a 1920x 1080 screen. However when displayed on a screen of smaller resolution like 1280x800, I can keep the SAME LAYOUT by changing the image+text part to take up col-md-5 span. So my question is, is it possible to change the element's col-md class using media queries ? I know CSS cannot touch an elements classes but I thought maybe bootstrap came along with a solution. Otherwise I know I can use JavaScript to get the window size and swap the classes.
Here is some code should you need. I didnt want to post any code that is not relevant but if you guys need the whole thing, I can set up a jsfiddle prob.
Thanks ! 1
HTML:
<div class="newsfeed">
<div class="container">
<div class="row">
<div class="col-md-11 mainfeed">
<div class="row top-buffer">
<div class="col-md-3">
<img src="images/chris.jpg" width="190px" />
</div>
<div class="col-md-9">
<h2 class="pullup">Some text here</h2>
<p id="bodypart">Some more text here </p>
</div>
</div>
<div class="row top-buffer topborder">
<div class="col-md-3">
<img src="images/city.jpg" width="190px" height="280px" />
</div>
<div class="col-md-9">
<h2 class="pullup">Text text text</h2>
<p id="bodypart">Text....</p>
</div>
</div>
<div class="row top-buffer topborder">
<div class="col-md-3">
<img src="images/alex.jpg" width="190px" height="280px" />
</div>
<div class="col-md-9">
<h2 class="pullup">Some news text </h2>
<p id="bodypart">xxxxxxxxxxx
</p>
</div>
</div>
</div>
<div class="col-md-1 pull-right">
<!-- Tweet RRS-->
<div class="tweets pull-right">
<a class="twitter-timeline" href="https://twitter.com/sinanspd" data-widget-id="540693554432323584"
width="380px" data-chrome="transparent noscrollbar">Tweets by #sinanspd</a>
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],
p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}
}(document,"script","twitter-wjs");
</script>
</div>
</div>
</div>
</div>
</div>
Relevant CSS:
/* ----------COMMON STYLING ------ */
body{
background-color: black !important;
}
.container{
width: 100%;
}
.jumbotron{
height: 340px;
background-size: cover;
background-image: url("images/banner.jpg");
background-repeat: no-repeat;
background-position: center;
}
.nav li{
display: inline;
margin-right: 130px;
}
#nomarginleft{
margin-right: 0px;
}
.nav a{
font-family: "Crimson Text";
font-size: 28px;
font-weight: bold;
z-index: 2;
text-decoration: none !important;
}
.pull-left{
margin-left: -350px;
margin-top: -30px;
}
.pull-right{
margin-right: -300px;
margin-top: -30px;
}
.nav{
background-color: black;
width: 100%;
}
.fixed {
position: fixed;
top: 0px;
height: 50px;
z-index: 1;
background-color: black;
}
/*--------------------- HOME PAGE ---------------- */
#display{
width: 960px;
height: 420px;
overflow: hidden;
margin: 30px auto 0px auto;
border-radius: 4px;
background-color: white;
}
#display ul{
position: relative;
margin: 0;
padding: 0;
height: 960px;
width: 420px;
list-style: none;
}
#display ul li{
position: relative;
display: block;
float: left;
margin: 0;
padding: 0;
width: 960px;
height: 420px;
}
#head > p{
font-family: "Crimson Text";
font-size: 30px;
font-weight: bold;
}
#head{
margin-top: 30px;
margin-left: 220px;
}
.newsfeed{
width: 86%;
height: 800px;
margin-left: -160px;
}
.mainfeed{
margin-left: 130px;
}
.pullup{
margin-top: 0px;
}
.top-buffer{
margin-top: 20px;
}
.topborder{
border-top: 1px solid white;
}
.tweets{
background-color: rgba(247,12,12,0.3);
border: 1px solid white;
margin-left: 50px;
border-color: white;
}
#media (min-width: 1000px) and (max-width: 1300px){
.jumbotron{
height: 250px;
}
.nav li{
margin-right: 50px;
}
.nav a{
font-size: 25px;
}
.pull-left{
margin-left: -60px;
}
.pull-right{
margin-right: -40px;
}
#display{
width: 700px;
height: 350px;
}
#head > p{
font-size: 25px;
}
#head{
margin-top: 30px;
margin-left: 80px;
display: block;
}
.newsfeed{
width: 86%;
}
.newsfeed h2{
font-size: 20px;
}
.mainfeed{
margin-left: 230px;
}
.newsfeed h2, .newsfeed p{
margin-left: 0px;
}
.top-buffer{
width: 800px;
}
.newsfeed .pull-right{
margin-right: -120px;
}
.tweets{
margin-right: -500px;
}
}
Why don't you change your code like below
<div>
<div class="col-lg-9 col-md-5">
<h2 class="pullup">Text text text</h2>
<p id="bodypart">Text....</p>
</div>
<div class="col-lg-3 col-md-5">
<img src="images/alex.jpg" width="190px" height="280px" />
</div>
</div>
So now, on bigger screens the screen will we divided 9 cols and 3 cols, on smaller screen sizes it will be 5 cols each.
If you want to change the layout for smaller screen i.e. tablets and screen just user col-sm-xx and col-xm-xx respectively.

Resources