Hexagon grid with border and image - css

I am trying to achieve the image bellow:
I can do a hexagon border and text but I have no idea how to add the hexagon image and to do the grid of 3 hexagons.
Any help will be highly appreciate. If here is more elegant way using clip-path of SVG please help.
Here is my code:
HTML
<div class="container">
<div class="row">
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
</div>
</div>
CSS
.hexagon {
position: relative;
width: 200px;
height: 115.47px;
background-color: #ffffff;
margin: 57.74px 0;
border-left: solid 2px #4850be;
border-right: solid 2px #4850be;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
z-index: 1;
width: 141.42px;
height: 141.42px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 27.2893px;
}
.hexagon:before {
top: -70.7107px;
border-top: solid 2.8284px #4850be;
border-right: solid 2.8284px #4850be;
}
.hexagon:after {
bottom: -70.7107px;
border-bottom: solid 2.8284px #4850be;
border-left: solid 2.8284px #4850be;
}

So basically i have done it the same way, like u did before..
You could try a solution like this:
.hexagon {
position: relative;
width: 200px;
height: 115.47px;
background-color: #ffffff;
margin: 57.74px 0;
border-left: solid 2px #4850be;
border-right: solid 2px #4850be;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
z-index: 1;
width: 141.42px;
height: 141.42px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 27.2893px;
/* NEW */
z-index:1;
}
.hexagon:before {
top: -70.7107px;
border-top: solid 2.8284px #4850be;
border-right: solid 2.8284px #4850be;
}
.hexagon:after {
bottom: -70.7107px;
border-bottom: solid 2.8284px #4850be;
border-left: solid 2.8284px #4850be;
}
/* NEW */
.icon-box {
width: 70px;
height: 30px;
background-color: orange;
position: absolute;
top:-35px;
left: 0;
right: 0;
margin: auto;
z-index: 10;
}
.icon-box:before,
.icon-box:after {
content: "";
position: absolute;
z-index: 1;
width: 50px;
height: 50px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 0;
right: 0;
margin: auto;
background-color: orange;
z-index:1;
}
.icon-box:before {
top: -25px;
}
.icon-box:after {
bottom: -25px;
}
.icon-box i {
position: absolute;
left: 0;
right: 0;
bottom: -15px;
margin: 0 auto;
z-index: 20;
font-size: 50px;
width: 40px;
height: 40px;
text-align: center;
color: #fff;
}
/* JUST FOR DEMO PURPOSE */
.text {
z-index: 10;
position: relative;
font-size: 7px;
text-align: center;
padding: 20px;
}
.text h3 {
font-size: 8px;
}
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<div class="row">
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
</div>
</div>
(i added bootstrap and fontawesome, for demonstration purpose..)

I managed to sort it out. Here is my different way:
#content-middle {
position: relative;
width: 100%;
min-height: 100vh;
margin: 0 auto;
overflow: hidden;
}
#content-middle::before {
top: 0;
height: 100%;
background: #f4f4f6;
-webkit-clip-path: polygon(0 46%, 0% 100%, 54% 100%);
clip-path: polygon(0 46%, 0% 100%, 54% 100%);
z-index: -1;
}
#content-middle::before, #content::after {
content: "";
position: absolute;
left: 0;
width: 100%;
}
.hexWrapper {
text-align: center;
margin: 0px;
position: relative;
display: inline-block;
width: 150px; /*Change this to resize*/
height: 150px; /*Change this to resize*/
min-width: 150px;
min-height: 150px;
float:left;
}
.hexagon {
height: calc(100%/1.732050807);
width: 100%;
background-color: #ffffff;
display:inline-block;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
background-color: inherit;
height: inherit;
width: inherit;
left: -1px; right: -1px; top: 0; bottom: 0;
}
.hexagon:before {
transform: rotateZ(60deg);
}
.hexagon:after {
transform: rotateZ(120deg);
}
.hexagon,
.hexagon:before,
.hexagon:after {
box-sizing: content-box;
border: solid 2px #4850be;
border-top-width: 0;
border-bottom-width: 0;
z-index: -1; /*We need to force the z-index so we can put some text over*/
}
#container{
padding-top: 60px;
width:100%;
min-width:910px; /* so the page doesn't get too small. This should be done better with media queries*/
}
.row-hexagon{
clear:both; /*to reset all the configs*/
float:left;
display: flex; /* using some flex to aline to center */
justify-content: center;
overflow:hidden; /*this is for after, when we add more hex's*/
padding-top:145px; /* To take care of the top part of the hex, needs changing if we change the size on the wrapper*/
position:relative;
}
.fullWidth{
width: 100%;
}
.icon-box{
width: 75px;
height:40px;
background-color: #4850be;
position: absolute;
top:-25px;
left: 0;
right: 0;
margin: auto;
z-index: 10;
}
.icon-box:before,
.icon-box:after{
content: "";
position: absolute;
z-index: 1;
width: 50px;
height: 50px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 0;
right: 0;
margin: auto;
background-color: #4850be;
z-index:1;
}
.icon-box:before {
top: -25px;
}
.icon-box:after {
bottom: -25px;
}
.icon-box i,
.icon-box img {
position: absolute;
left: 0;
right: 0;
bottom: -20px;
margin: 0 auto;
z-index: 20;
font-size: 90px;
width: 80px;
height: 80px;
text-align: center;
color: #fff;
}
.text {
z-index: 10;
position: relative;
font-size: 17px;
text-align: center;
padding: 20px;
}
.text h3 {
font-size: 1em;
color:#42c9c0;
font-weight:700;
}
.text h4{
font-size: 0.8em;
color:#42c9c0;
font-weight:300;
}
.text p{
font-size: 0.5em;
font-weight:300;
font-style:italic;
}
<!-- FonT Awesome for demo purposes here -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<section id="content-middle">
<div id="container-hexagon">
<div class="row-hexagon fullWidth" id="firstRow">
<div class="hexWrapper">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Title</h3>
<h4>Subtitle </h4>
<p>Text</p>
</div>
</div>
</div>
<div class="hexWrapper">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Title</h3>
<h4>Subtitle </h4>
<p>Text</p>
</div>
</div>
</div>
<div class="hexWrapper">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Title</h3>
<h4>Subtitle </h4>
<p>Text</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

Related

Hexagon grid with border and image responsive (clip path probably)

I already asked a similar question but it seems my code is not correct.
I used border in pixels and it is not responsive. I used bootsrtrap to make it responsive but then the hexagons are not as a grid (everyone next to the other)
Here is an image what should be done.
This is how it looks now
Here is my code, which probably is not the right one to allow me to achieve the image above. My hexagons are not as a grid (close to each others), are not scalable and are not responsive.
.hexagon {
position: relative;
width: 200px;
height: 115.47px;
background-color: #ffffff;
margin: 57.74px 0;
border-left: solid 2px #4850be;
border-right: solid 2px #4850be;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
z-index: 1;
width: 141.42px;
height: 141.42px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 27.2893px;
z-index:1;
}
.hexagon:before {
top: -70.7107px;
border-top: solid 2.8284px #4850be;
border-right: solid 2.8284px #4850be;
}
.hexagon:after {
bottom: -70.7107px;
border-bottom: solid 2.8284px #4850be;
border-left: solid 2.8284px #4850be;
}
/* NEW */
.icon-box{
width: 70px;
height: 30px;
background-color: #4850be;
position: absolute;
top:-35px;
left: 0;
right: 0;
margin: auto;
z-index: 10;
}
.icon-box:before,
.icon-box:after{
content: "";
position: absolute;
z-index: 1;
width: 50px;
height: 50px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 0;
right: 0;
margin: auto;
background-color: #4850be;
z-index:1;
}
.icon-box:before {
top: -25px;
}
.icon-box:after {
bottom: -25px;
}
.icon-box i,
.icon-box img
{
position: absolute;
left: 0;
right: 0;
bottom: -20px;
margin: 0 auto;
z-index: 20;
font-size: 80px;
width: 60px;
height: 60px;
text-align: center;
color: #fff;
}
.text {
z-index: 10;
position: relative;
font-size: 7px;
text-align: center;
padding: 20px;
}
.text h3 {
font-size: 8px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<section id="content">
<div class="container">
<div class="row">
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="icon-box"><img src="images/section/section_2_icon_man.png" alt="" ></div>
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="icon-box"><img src="images/section/section_2_icon_woman.png" alt="" ></div>
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
<div class="col-3 col-6-medium col-12-small">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Head of Trust & Safety,Video Streaming Platform</h3>
<p>"ActiveFence is the foundation of our proactive moderation efforts. It's easy to show that there is no in-house equivalent we could ever develop. Even the best internal teams will never have ActiveFence's subject matter and linguistic expertise, and the cross platform visibility their technology provides is invaluable to keeping our users safe." </p>
</div>
</div>
</div>
</div>
</div>
</section>
Your webpage/website is not responsive because you used px, to make it responsive use Viewport Units like vw for width and vh for height instead of px and % to make your webpage/website responsive. (Note:- 1vw=0.5cm)
It will surely work but if it doesn't let me know in the comments, I will try my best to help you.
I managed to sort it out. Here is my different way:
#content-middle {
position: relative;
width: 100%;
min-height: 100vh;
margin: 0 auto;
overflow: hidden;
}
#content-middle::before {
top: 0;
height: 100%;
background: #f4f4f6;
-webkit-clip-path: polygon(0 46%, 0% 100%, 54% 100%);
clip-path: polygon(0 46%, 0% 100%, 54% 100%);
z-index: -1;
}
#content-middle::before, #content::after {
content: "";
position: absolute;
left: 0;
width: 100%;
}
.hexWrapper {
text-align: center;
margin: 0px;
position: relative;
display: inline-block;
width: 150px; /*Change this to resize*/
height: 150px; /*Change this to resize*/
min-width: 150px;
min-height: 150px;
float:left;
}
.hexagon {
height: calc(100%/1.732050807);
width: 100%;
background-color: #ffffff;
display:inline-block;
}
.hexagon:before,
.hexagon:after {
content: "";
position: absolute;
background-color: inherit;
height: inherit;
width: inherit;
left: -1px; right: -1px; top: 0; bottom: 0;
}
.hexagon:before {
transform: rotateZ(60deg);
}
.hexagon:after {
transform: rotateZ(120deg);
}
.hexagon,
.hexagon:before,
.hexagon:after {
box-sizing: content-box;
border: solid 2px #4850be;
border-top-width: 0;
border-bottom-width: 0;
z-index: -1; /*We need to force the z-index so we can put some text over*/
}
#container{
padding-top: 60px;
width:100%;
min-width:910px; /* so the page doesn't get too small. This should be done better with media queries*/
}
.row-hexagon{
clear:both; /*to reset all the configs*/
float:left;
display: flex; /* using some flex to aline to center */
justify-content: center;
overflow:hidden; /*this is for after, when we add more hex's*/
padding-top:145px; /* To take care of the top part of the hex, needs changing if we change the size on the wrapper*/
position:relative;
}
.fullWidth{
width: 100%;
}
.icon-box{
width: 75px;
height:40px;
background-color: #4850be;
position: absolute;
top:-25px;
left: 0;
right: 0;
margin: auto;
z-index: 10;
}
.icon-box:before,
.icon-box:after{
content: "";
position: absolute;
z-index: 1;
width: 50px;
height: 50px;
-webkit-transform: scaleY(0.5774) rotate(-45deg);
-ms-transform: scaleY(0.5774) rotate(-45deg);
transform: scaleY(0.5774) rotate(-45deg);
background-color: inherit;
left: 0;
right: 0;
margin: auto;
background-color: #4850be;
z-index:1;
}
.icon-box:before {
top: -25px;
}
.icon-box:after {
bottom: -25px;
}
.icon-box i,
.icon-box img {
position: absolute;
left: 0;
right: 0;
bottom: -20px;
margin: 0 auto;
z-index: 20;
font-size: 90px;
width: 80px;
height: 80px;
text-align: center;
color: #fff;
}
.text {
z-index: 10;
position: relative;
font-size: 17px;
text-align: center;
padding: 20px;
}
.text h3 {
font-size: 1em;
color:#42c9c0;
font-weight:700;
}
.text h4{
font-size: 0.8em;
color:#42c9c0;
font-weight:300;
}
.text p{
font-size: 0.5em;
font-weight:300;
font-style:italic;
}
<!-- <!-- FonT Awesome for demo purposes here --> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<section id="content-middle">
<div id="container-hexagon">
<div class="row-hexagon fullWidth" id="firstRow">
<div class="hexWrapper">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Title</h3>
<h4>Subtitle </h4>
<p>Text</p>
</div>
</div>
</div>
<div class="hexWrapper">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Title</h3>
<h4>Subtitle </h4>
<p>Text</p>
</div>
</div>
</div>
<div class="hexWrapper">
<div class="hexagon">
<div class="icon-box"><i class="fa fa-user"></i></div>
<div class="text">
<h3>Title</h3>
<h4>Subtitle </h4>
<p>Text</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

div clip path according to the parent rectangle

I am trying to clip this strap into the parent rectangle.
Image-
HTML CODE:
<div class="pricing_plan ultimate">
<div class="strap">
<P>RECOMMENDED</P>
</div>
<div class="p_name">
<p>Ultimate</p>
</div>
<div class="p_plan">
<p><strike>₹ 2388</strike></p>
<h3>₹ 1,099</h3>
<p>Save 53%</p>
</div>
<div class="p_duration">
<p>12 Months</p>
<p>356 Days</p>
</div>
<a href="">
<button class="pricing_button ultimate">BUY</button>
</a>
</div>
CSS
.s2 .pricing_plans .ultimate .strap{
position: relative;
top: -13px;
right: 65px;
transform: rotate(-35deg);
clip-path: inset(0px 50px 50px 0px);
}
.s2 .pricing_plans .ultimate .strap p{
background-color: white;
font-size: 10px;
color: #3499E0;
padding-left: 20px;
padding-right: 20px;
margin-top: 0px;
margin-bottom: 0px;
}
How can I clip it into the rectangle so that it doesn't flow outside.
I have tried overflow: hidden it doesn't seem to work.
What is the best method to it, so that it is best for a responsive design?
You have to use position:relative with the parent bloc, and position:absolute with the child bloc :
.bloc{
background: red;
position: relative;
overflow: hidden;
width: 200px;
height: 300px;
}
.bloc .label{
position: absolute;
top: 15px;
left: -20px;
width: 120px;
height: 20px;
background: black;
color: #fff;
text-align: center;
transform: rotate(-35deg);
}
<div class="bloc">
<div class="label">
Label here
</div>
</div>

Bootsrap4 :How to make page to run in responsive

I am creating a design page in left side there is 2 box and in right it is 3 box.
It's working fine on desktop, now i wanted the box should be show single on mobile devices but unable to figure out.
Following is the my code :
<!DOCTYPE html>
<html lang="en-US">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style>
/* div partition */
#homecategory { clear: both; padding: 0 10px; max-width: 1230px; margin: 0 auto;}
.category { position: relative; margin-bottom: 20px;}
.left-image { float: left; width: 49%; margin-right: 1%;}
.right-image { float: left; width: 49%; margin-left: 1%;}
/* animation start here */
.cf:before,.cf:after{ display: table; content: " ";}
.cf:after{ clear: both}
.catnamediv { position: absolute; top: 35%; width: 100%; text-align: center; color: #fff; text-transform: uppercase; font-size: 25px; z-index: 99; font-weight: bold; }
.catnamediv a { display: none; width: 180px; margin: 30px auto; background: #297fca; color: #fff; font-size: 20px; padding: 10px 0; text-decoration: none;}
.fancy-card:hover .shopnow{ display: block;}
/*fancy card styling*/
.fancy-card{ background: #eee; width: 100%; display: block; float: left; position: relative; box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0); transition: all 250ms ease-in; min-height:288px; background-size: cover; background-position: center center; margin-bottom: 30px; }
.fancy-card .bg-overlay{ background: rgba(0,0,0,0.25); position: absolute; top: 0px; left: 0px;
width: 100%; height: 100%; transition: all 200ms linear;}
.category :hover p { border-bottom: 1px solid #fff; display: inline; padding-bottom: 12px;}
/*horizontal border elements (top & bottom)*/
.fancy-card .v-border{ position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; }
.fancy-card .v-border:before,.fancy-card .v-border:after{ width: 0%; height: 1px; left: 50%; transition: all 250ms ease-out; background: #fff; }
.fancy-card .v-border:before{ content: ''; top: 3%; position: absolute;}
.fancy-card .v-border:after{ content: ''; bottom:3%; position: absolute;}
/*horizontal elements (left & right)*/
.fancy-card .h-border{ position: absolute; top: 0%; left: 0%; width: 100%; height: 100%;}
.fancy-card .h-border:before,.fancy-card .h-border:after{ height: 0%; top: 50%; width: 1px;
transition: all 250ms ease-out; background: #fff;}
.fancy-card .h-border:before{ content: ''; left: 3%; height: 0%; position: absolute; }
.fancy-card .h-border:after{ content: ''; right:3%; position: absolute; }
/*hover states for interactivity*/
.fancy-card:active .v-border:before,.fancy-card:active .v-border:after,.fancy-card:hover .v-border:before,
.fancy-card:hover .v-border:after{ width: 94%; left: 3%; }
.fancy-card:active .h-border:before,.fancy-card:active .h-border:after,.fancy-card:hover .h-border:before,
.fancy-card:hover .h-border:after{ height: 94%; top: 3%; }
/*hovering over card, adjust background overlay*/
.fancy-card:active .bg-overlay,.fancy-card:hover .bg-overlay{ background: rgba(0,0,0,0.45); }
/*medium and large profiles*/
#media screen and (min-width: 768px){
.fancy-card{ width: 30%; margin: 0% 1.66% 3.33% 1.66%; }
}
/* title decorate */
.cattilewrap { text-align: center; padding: 20px 0; text-transform: uppercase; position: relative;
background: #fff; z-index: -1;margin-top: 2%;}
.catdnamediv2 { font-size: 30px; font-weight: 500; background: #fff;}
.catdnamediv2 span { display: inline-block; position: relative; }
.catdnamediv2 span:before,.catdnamediv2 span:after { content: ""; position: absolute; height: 5px;
border-bottom: 1px solid #0088cc; border-top: 1px solid #0088cc; top: 0; width: 100%;}
.catdnamediv2 span:before { right: 100%; margin-right: 15px;}
.catdnamediv2 span:after { left: 100%; margin-left: 15px;}
</style>
</head>
<body>
<div id="homecategory" class="home-category ">
<div class="cattilewrap">
<div class="col-12 d-flex justify-content-center catdnamediv1">Shop By</div>
<div class="col-12 d-flex justify-content-center catdnamediv2"><span>Category</span></div>
</div>
<div class="row cf ">
<div class="col-md-6">
<div class=" left-image" >
<div class="category cat01 fancy-card" style=" background-image:url('_2.jpg');width:593px;height:436px;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
<div class="category cat02 fancy-card" style=" background-image:url('_3.jpg');width:593px;height:436px;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class=" right-image" >
<div class="category cat03 fancy-card" style=" background-image:url('_1.jpg');width:593px;height:279px;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
<div class="category cat04 fancy-card" style=" background-image:url('_4.jpg');width:593px;height:279px;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
<div class="category cat05 fancy-card" style=" background-image:url('cat5.jpg');width:593px;height:279px;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
I have also pasted this code in jsfiddle https://jsfiddle.net/arunendra/w8yhmt70/1/#&togetherjs=Mt5zNmbI7k
This code is written in html and bootsrap4
you can put width:100%;height:100%; in your code instead of width:593px;height:436px; and also add the below code for single box in mobile view.
#media screen and (max-width: 768px){
.left-image { width: 100%; margin-right: 0;}
.right-image { width: 100%; margin-left: 0;}
}
<!DOCTYPE html>
<html lang="en-US">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style>
/* div partition */
#homecategory { clear: both; padding: 0 10px; max-width: 1230px; margin: 0 auto;}
.category { position: relative; margin-bottom: 20px;}
.left-image { float: left; width: 49%; margin-right: 1%;}
.right-image { float: left; width: 49%; margin-left: 1%;}
/* animation start here */
.cf:before,.cf:after{ display: table; content: " ";}
.cf:after{ clear: both}
.catnamediv { position: absolute; top: 35%; width: 100%; text-align: center; color: #fff; text-transform: uppercase; font-size: 25px; z-index: 99; font-weight: bold; }
.catnamediv a { display: none; width: 180px; margin: 30px auto; background: #297fca; color: #fff; font-size: 20px; padding: 10px 0; text-decoration: none;}
.fancy-card:hover .shopnow{ display: block;}
/*fancy card styling*/
.fancy-card{ background: #eee; width: 100%; display: block; float: left; position: relative; box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0); transition: all 250ms ease-in; min-height:288px; background-size: cover; background-position: center center; margin-bottom: 30px; }
.fancy-card .bg-overlay{ background: rgba(0,0,0,0.25); position: absolute; top: 0px; left: 0px;
width: 100%; height: 100%; transition: all 200ms linear;}
.category :hover p { border-bottom: 1px solid #fff; display: inline; padding-bottom: 12px;}
/*horizontal border elements (top & bottom)*/
.fancy-card .v-border{ position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; }
.fancy-card .v-border:before,.fancy-card .v-border:after{ width: 0%; height: 1px; left: 50%; transition: all 250ms ease-out; background: #fff; }
.fancy-card .v-border:before{ content: ''; top: 3%; position: absolute;}
.fancy-card .v-border:after{ content: ''; bottom:3%; position: absolute;}
/*horizontal elements (left & right)*/
.fancy-card .h-border{ position: absolute; top: 0%; left: 0%; width: 100%; height: 100%;}
.fancy-card .h-border:before,.fancy-card .h-border:after{ height: 0%; top: 50%; width: 1px;
transition: all 250ms ease-out; background: #fff;}
.fancy-card .h-border:before{ content: ''; left: 3%; height: 0%; position: absolute; }
.fancy-card .h-border:after{ content: ''; right:3%; position: absolute; }
/*hover states for interactivity*/
.fancy-card:active .v-border:before,.fancy-card:active .v-border:after,.fancy-card:hover .v-border:before,
.fancy-card:hover .v-border:after{ width: 94%; left: 3%; }
.fancy-card:active .h-border:before,.fancy-card:active .h-border:after,.fancy-card:hover .h-border:before,
.fancy-card:hover .h-border:after{ height: 94%; top: 3%; }
/*hovering over card, adjust background overlay*/
.fancy-card:active .bg-overlay,.fancy-card:hover .bg-overlay{ background: rgba(0,0,0,0.45); }
/*medium and large profiles*/
#media screen and (min-width: 768px){
.fancy-card{ width: 30%; margin: 0% 1.66% 3.33% 1.66%; }
}
/* title decorate */
.cattilewrap { text-align: center; padding: 20px 0; text-transform: uppercase; position: relative;
background: #fff; z-index: -1;margin-top: 2%;}
.catdnamediv2 { font-size: 30px; font-weight: 500; background: #fff;}
.catdnamediv2 span { display: inline-block; position: relative; }
.catdnamediv2 span:before,.catdnamediv2 span:after { content: ""; position: absolute; height: 5px;
border-bottom: 1px solid #0088cc; border-top: 1px solid #0088cc; top: 0; width: 100%;}
.catdnamediv2 span:before { right: 100%; margin-right: 15px;}
.catdnamediv2 span:after { left: 100%; margin-left: 15px;}
</style>
</head>
<body>
<div id="homecategory" class="home-category ">
<div class="cattilewrap">
<div class="col-12 d-flex justify-content-center catdnamediv1">Shop By</div>
<div class="col-12 d-flex justify-content-center catdnamediv2"><span>Category</span></div>
</div>
<div class="row cf ">
<div class="col-md-6">
<div class=" left-image" >
<div class="category cat01 fancy-card" style=" background-image:url('_2.jpg');width:100%;height:100%;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
<div class="category cat02 fancy-card" style=" background-image:url('_3.jpg');width:100%;height:100%;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class=" right-image" >
<div class="category cat03 fancy-card" style=" background-image:url('_1.jpg');width:100%;height:100%;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
<div class="category cat04 fancy-card" style=" background-image:url('_4.jpg');width:100%;height:100%;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
<div class="category cat05 fancy-card" style=" background-image:url('cat5.jpg');width:100%;height:100%;">
<div class="bg-overlay"></div>
<div class="v-border"></div>
<div class="h-border"></div>
<div class="catnamediv">
<p>sectional sofa</p>
<a class="shopnow" href="#">shop now</a>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Border Radius Error only on Safari Browser

I am trying to make a node that can zoom its picture when hovered upon. Everything works fine on Chrome and Mozilla. However, for some reason Safari gets buggy every time the image is on hover. The border radius disappears when hovered into a sharp edge and reappears when un-hovered. Here is an example: FIDDLE
.img-zoom {
top: 0;
left: 0;
margin: 0;
display: block;
width: 100%;
height: 60%;
position: relative;
overflow: hidden;
}
.img-zoom img {
-webkit-transform: scale(1.04);
-ms-transform: scale(1.04);
transform: scale(1.04);
transition: all 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-zoom img:hover {
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
}
.blogDesc {
background-color: whitesmoke;
width: 100%;
height: 40%;
}
.blogContent {
width: 200px;
height: 200px;
word-wrap: break-word;
border-radius:25px;
overflow: hidden;
display:inline-block;
margin:10px;
}
.blogTitle {
font-weight: bold;
font-family: "Courier New";
text-align: center;
padding: 10px;
}
.blogText {
-webkit-column-width: 150px;
column-width: 150px;
height: 100%;
margin-left: 10px;
margin-right: 10px;
}
.blogAlign{
text-align:center;
}
<section class="blogAlign">
<div class="blogContent">
<div class="img-zoom"><img src="https://kbob.github.io/images/sample-3.jpg" alt="" title=""></div>
<div class="blogDesc">
<div class="blogTitle">
My Multimedia Agency Tool
</div>
<div class="blogText">
BBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLAB
</div>
</div>
</div>
<div class="blogContent">
<div class="img-zoom"><img src="https://kbob.github.io/images/sample-3.jpg" alt="" title=""></div>
<div class="blogDesc">
<div class="blogTitle">
My Multimedia Agency Tool
</div>
<div class="blogText">
BBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLAB
</div>
</div>
</div>
<div class="blogContent">
<div class="img-zoom"><img src="https://kbob.github.io/images/sample-3.jpg" alt="" title="" class="picturez"></div>
<div class="blogDesc">
<div class="blogTitle">
My Multimedia Agency Tool
</div>
<div class="blogText">
BBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLABBBLALBLABLALBALBLBALBALBALBLABLABLABLABLABLALBLABLABLABLALBALBLABLABLABLABLALBLAB
</div>
</div>
</div>
</section>
Does anyone know how to fix this? Thanks in advance.
<div class="activity_rounded"><img src="http://placehold.it/100" /></div>
.activity_rounded {
display: inline-block;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
-khtml-border-radius: 50%;
border: 3px solid #fff;
}
.activity_rounded img {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
-khtml-border-radius: 50%;
vertical-align: middle;
}
it should work properly.

why text appearing at the bottom of div?

I have placed several paragraphs into div element but text are appearing at the bottom of block. What might be the problem? As well would be great if you can suggest how to make the blocks more responsive.
HTML:
<div class="container">
<div class="content">
<div class="inner">
<h1><span>What</span> Clients Says</h1>
<div class="main-block">
<div class="testimonial-block-1">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH" alt="">
<p>- Staciya Trollio</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing
and industry. Lorem Ipsum has been the industry.</p>
</div>
<div class="testimonial-block-2">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH">
<p>- David Soul</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing
and industry. Lorem Ipsum has been the industry.</p>
</div>
</div>
</div>
</div>
</div>
CSS:
* {
padding: 0;
margin: 0;
box-sizing:border-box;
}
html, body {
height: 100%;
}
.container {
height: 100%;
background: url(bg.jpg);
min-width: 100%;
background-size: 100%;
font-family: sans-serif;
}
.content {
position:absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(16,21,26,.9);
width: 100%;
}
.inner {
position: absolute;
left: 50%;
top: 40%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.inner h1 {
color: #3170a8;
text-align: center;
}
.inner h1 span {
color: #ee8129;
}
.main-block {
margin-top: 50px;
}
.testimonial-block-1 {
float: left;
max-width: 364px;
background-color: #fff;
min-height: 100px;
margin-right: 45px;
position:relative;
z-index:100;
}
.testimonial-block-1::after,
.testimonial-block-2::after {
position: absolute;
top: 25%;
left: -20px;
content: '';
width: 0;
height: 0;
border-right: solid 20px rgb(255,255,255);
border-bottom: solid 20px transparent;
border-top: solid 20px transparent;
z-index:2;
}
.testimonial-block-1 img {
position:relative;
right:150px;
}
.testimonial-block-2 img,
.testimonial-block-1 img{
position:relative;
right:150px;
max-width: 107px;
height: 106px;
}
.testimonial-block-2 {
float: right;
max-width: 364px;
background-color: #fff;
min-height: 100px;
position:relative;
left:160px;
z-index:100;
}
.testimonial-block-1 p:nth-child(3),
.testimonial-block-2 p:nth-child(3) {
border-bottom:1px dashed #222;
}
Jsfiddle
Use this for the images, otherwise (if you use position: relative , regardless of the settings) the space they usually occupy will remain reserved for them (i.e. empty) in the container:
position:absolute;
left: -150px;
and create a margin-bottom below the testemonial-blocks:
* {
padding: 0;
margin: 0;
box-sizing:border-box;
}
html, body {
height: 100%;
}
.container {
height: 100%;
background: url(bg.jpg);
min-width: 100%;
background-size: 100%;
font-family: sans-serif;
}
.content {
position:absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(16,21,26,.9);
width: 100%;
}
.inner {
position: absolute;
left: 50%;
top: 40%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.inner h1 {
color: #3170a8;
text-align: center;
}
.inner h1 span {
color: #ee8129;
}
.main-block {
margin-top: 50px;
}
.testimonial-block-1 {
float: left;
max-width: 364px;
background-color: #fff;
min-height: 100px;
margin-right: 45px;
position:relative;
z-index:100;
}
.testimonial-block-1,
.testimonial-block-2 {
margin-bottom: 30px;
}
.testimonial-block-1::after,
.testimonial-block-2::after {
position: absolute;
top: 25%;
left: -20px;
content: '';
width: 0;
height: 0;
border-right: solid 20px rgb(255,255,255);
border-bottom: solid 20px transparent;
border-top: solid 20px transparent;
z-index:2;
}
.testimonial-block-2 img,
.testimonial-block-1 img{
position:absolute;
left: -150px;
max-width: 107px;
height: 106px;
}
.testimonial-block-2 {
float: right;
max-width: 364px;
background-color: #fff;
min-height: 100px;
position:relative;
left:160px;
z-index:100;
}
.testimonial-block-1 p:nth-child(3),
.testimonial-block-2 p:nth-child(3) {
border-bottom:1px dashed #222;
}
<div class="container">
<div class="content">
<div class="inner">
<h1><span>What</span> Clients Says</h1>
<div class="main-block">
<div class="testimonial-block-1">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH" alt="">
<p>- Staciya Trollio</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing
and industry. Lorem Ipsum has been the industry.</p>
</div>
<div class="testimonial-block-2">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH">
<p>- David Soul</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing
and industry. Lorem Ipsum has been the industry.</p>
</div>
</div>
</div>
</div>
</div>
Try this:
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html,
body {
height: 100%;
}
.container {
height: 100%;
background: url(bg.jpg);
min-width: 100%;
background-size: 100%;
font-family: sans-serif;
}
.content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(16, 21, 26, .9);
width: 100%;
}
.inner {
position: absolute;
left: 50%;
top: 40%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.inner h1 {
color: #3170a8;
text-align: center;
}
.inner h1 span {
color: #ee8129;
}
.main-block {
margin-top: 50px;
}
.testimonial-block-1 {
float: left;
max-width: 364px;
background-color: #fff;
min-height: 100px;
margin-right: 45px;
position: relative;
z-index: 100;
}
.testimonial-block-1::after,
.testimonial-block-2::after {
position: absolute;
top: 25%;
left: -20px;
content: '';
width: 0;
height: 0;
border-right: solid 20px rgb(255, 255, 255);
border-bottom: solid 20px transparent;
border-top: solid 20px transparent;
z-index: 2;
}
.testimonial-block-1 img {
position: relative;
right: 150px;
}
.testimonial-block-2 img,
.testimonial-block-1 img {
position: absolute;
left: -150px;
max-width: 107px;
height: 106px;
}
.testimonial-block-2 {
float: right;
max-width: 364px;
background-color: #fff;
min-height: 100px;
position: relative;
left: 160px;
z-index: 100;
}
.testimonial-block-1 p:nth-child(3),
.testimonial-block-2 p:nth-child(3) {
border-bottom: 1px dashed #222;
}
<div class="container">
<div class="content">
<div class="inner">
<h1><span>What</span> Clients Says</h1>
<div class="main-block">
<div class="testimonial-block-1">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH" alt="">
<p>- Staciya Trollio</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing and industry. Lorem Ipsum has been the industry.</p>
</div>
<div class="testimonial-block-2">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH">
<p>- David Soul</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing and industry. Lorem Ipsum has been the industry.</p>
</div>
</div>
</div>
</div>
</div>
I've changed the position: relative to position: absolute and added a negative left: -150px and removed the right: 150px.
i think this will do the trick, i used display:flex to set everything in the right place i also removed a few of the position:absolute. i believe this will save you a lot of unnecessary code and positioning and will make your code much cleaner.
https://jsfiddle.net/Lsjo988z/3/
html:
<div class="container">
<div class="content">
<div class="inner">
<h1><span>What</span> Clients Says</h1>
<div class="main-block">
<div class="chat-container align-start" >
<div class="row">
<div>
<img class="img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH" alt="">
</div>
<div class="testimonial-block">
<p>- Staciya Trollio</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing
and industry. Lorem Ipsum has been the industry.</p>
</div>
</div>
</div>
<div class="chat-container align-center" >
<div class="row">
<div>
<img class="img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLdI6QE_lvzsCy_6VTsikYLz0iPFnWSv2vbGVzbwgQA8OlEbpH">
</div>
<div class="testimonial-block">
<p>- David Soul</p>
<p>Customer</p>
<p>Lorem Ipsum is simply dummy text of the printing
and industry. Lorem Ipsum has been the industry.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
css:
* {
padding: 0;
margin: 0;
box-sizing:border-box;
}
html, body {
height: 100%;
}
.container {
height: 100%;
background: url(bg.jpg);
min-width: 100%;
background-size: 100%;
font-family: sans-serif;
}
.content {
width: 100%;
height: 100%;
background-color: rgba(16,21,26,.9);
}
.inner {
width: 100%;
}
.inner h1 {
color: #3170a8;
text-align: center;
}
.inner h1 span {
color: #ee8129;
}
.main-block {
margin-top: 50px;
}
.chat-container{
display:flex;
flex-wrap:wrap
}
.row{
display:flex;
-webkit-box-orient: horizontal;
-webkit-flex-direction: row;
flex-direction: row;
}
.align-start{
justify-content: flex-start;
}
.align-center{
justify-content: center;
}
.img{
max-width: 107px;
height: 106px;
}
.testimonial-block {
width:290px;
margin-left:43px;
//float: left;
max-width: 364px;
background-color: #fff;
min-height: 100px;
//margin-right: 45px;
position:relative;
z-index:100;
}
.testimonial-block::after {
position: absolute;
top: 25%;
left: -20px;
content: '';
width: 0;
height: 0;
border-right: solid 20px rgb(255,255,255);
border-bottom: solid 20px transparent;
border-top: solid 20px transparent;
z-index:2;
}
.testimonial-block-1 img {
position:relative;
right:150px;
}
.testimonial-block p:nth-child(3) {
border-bottom:1px dashed #222;
}
for more information about display flex abilities you can read this really good explanation https://css-tricks.com/snippets/css/a-guide-to-flexbox/

Resources