I have attached all the images first image is the image where i am getting issue and second one is the image which is correct and third is for mobile display.
<div class="eighth-page" id="eighth-page">
<div class="container-fluid">
<div class="row">
<div class="col-md-6" style="background-color: #E44E29;display: inline;">
<div class="eight-page-content">
<div class="eighth-page-heading">
<h3>PX Booth</span></h3>
<h5>PX Booth Hire</span></h5>
<!-- line height -->
<h5>PX Booth Hire</span></h5>
<!-- line height -->
</div>
<div class="eight-page-text">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<p>
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
<div class="eighth-page-content-btn">
<a href="#"><span class="btn-learn">Learn</span><span class="btn-more">More</span></a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="eighth-page-img">
<img src="img/5.jpg" class="img-responsive eighth-img">
</div>
</div>
</div>
</div>
</div>
Here is my CSS:
/---------------------- Eighth Page - colored ----------------------/
.eight-page-content {
margin-top: 40px;
margin-bottom: 40px;
margin-right: 10px;
margin-left: 30px;
width: 80%;
}
.eighth-page-heading h3 {
font-size: 30px;
text-transform: uppercase;
color: #fff;
text-align: left;
font-weight: 700;
line-height: 1.5em;
}
.eighth-page-heading h5 {
font-size: 16px;
text-transform: uppercase;
color: #9dff00;
text-align: left;
font-weight: 700;
line-height: 1.5em;
}
.eight-page-text {
padding-top: 20px;
padding-bottom: 20px;
}
.eight-page-text p {
color: #fff;
font-weight: 100;
font-size: 16px;
text-transform: capitalize;
}
.eighth-page-content-btn {
text-align: center;
margin-top: 27px;
margin-bottom: 27px;
}
.eighth-page-content-btn a {
text-decoration: none;
}
.btn-learn {
padding-top: 15px;
padding-bottom: 15px;
padding-right: 25px;
padding-left: 25px;
background-color: #9dff00;
text-transform: uppercase;
color: #fff;
font-weight: 600;
font-size: 16px;
word-spacing: 2px;
}
.btn-more {
padding-top: 15px;
padding-bottom: 15px;
padding-right: 25px;
padding-left: 25px;
background-color: #f2f0f4;
text-transform: uppercase;
color: #000;
font-weight: 600;
font-size: 16px;
}
.bg-color
{
background-color: #E44E29;
display: inline;
}
/*
Media query for content of colored box
*/
@media only screen and (max-width: 480px)
{
.eight-page-content {
margin-top: 40px;
margin-bottom: 40px;
margin-right: 10px;
margin-left: 30px;
width: 80%;
}
.eighth-page-heading h3 {
font-size: 30px;
text-transform: uppercase;
color: #fff;
text-align: left;
font-weight: 700;
line-height: 1.5em;
}
.eighth-page-heading h5 {
font-size: 16px;
text-transform: uppercase;
color: #9dff00;
text-align: left;
font-weight: 700;
line-height: 1.5em;
}
.eight-page-text {
padding-top: 20px;
padding-bottom: 20px;
}
.eight-page-text p {
color: #fff;
font-weight: 100;
font-size: 16px;
text-transform: capitalize;
}
.eighth-page-content-btn {
text-align: center;
margin-top: 27px;
margin-bottom: 27px;
}
.eighth-page-content-btn a {
text-decoration: none;
}
.btn-learn {
padding-top: 15px;
padding-bottom: 15px;
padding-right: 25px;
padding-left: 25px;
background-color: #9dff00;
text-transform: uppercase;
color: #fff;
font-weight: 600;
font-size: 16px;
word-spacing: 2px;
}
.btn-more {
padding-top: 15px;
padding-bottom: 15px;
padding-right: 25px;
padding-left: 25px;
background-color: #f2f0f4;
text-transform: uppercase;
color: #000;
font-weight: 600;
font-size: 16px;
}
.bg-color
{
background-color: #E44E29;
display: inline;
}
}
@media only screen and (max-width: 768px)
{
.eight-page-content {
margin-top: 40px;
margin-bottom: 40px;
margin-right: 10px;
margin-left: 30px;
width: 80%;
}
.eighth-page-heading h3 {
font-size: 30px;
text-transform: uppercase;
color: #fff;
text-align: left;
font-weight: 700;
line-height: 1.5em;
}
.eighth-page-heading h5 {
font-size: 16px;
text-transform: uppercase;
color: #9dff00;
text-align: left;
font-weight: 700;
line-height: 1.5em;
}
.eight-page-text {
padding-top: 20px;
padding-bottom: 20px;
}
.eight-page-text p {
color: #fff;
font-weight: 100;
font-size: 16px;
text-transform: capitalize;
}
.eighth-page-content-btn {
text-align: center;
margin-top: 27px;
margin-bottom: 27px;
}
.eighth-page-content-btn a {
text-decoration: none;
}
.btn-learn {
padding-top: 15px;
padding-bottom: 15px;
padding-right: 25px;
padding-left: 25px;
background-color: #9dff00;
text-transform: uppercase;
color: #fff;
font-weight: 600;
font-size: 16px;
word-spacing: 2px;
}
.btn-more {
padding-top: 15px;
padding-bottom: 15px;
padding-right: 25px;
padding-left: 25px;
background-color: #f2f0f4;
text-transform: uppercase;
color: #000;
font-weight: 600;
font-size: 16px;
}
.bg-color
{
background-color: #E44E29 !important;
display: inline;
}
}
/*----------------------------------
Media Query for img of eighth page
----------------------------------*/
@media (max-width:767px) {
.eighth-page-img img {
max-width: 100%;
max-height: 100%;
}
}
@media (min-width:768px) {
.eighth-page-img img {
max-width: 100vh;
max-height: 100vh;
}
}
@media (min-width:992px) {
.eighth-page-img img {
max-width: 100vh;
height: 480px;
}
}
@media (min-width:1200px) {
.eighth-page-img img {
max-width: 100vh;
height: 436px;
}
}
![This is the issue I am getting when I resize the browser. I have used max-height: 100vh and max-width:100vh. Either the image get stretched or image get magnified and overflow out of the div. ]3
Please help as I am new to the Front End Technology.I am using bootstrap3 and also tried flexbox but the issue is not resolved. Please help me out and I am using image of size 4000X2670 pixels.