Commit 0c451bc3 by Madhankumar

grid code change

parent 7a7050a7
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<link rel="stylesheet" href="style.css" /> <link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap" rel="stylesheet">
</head>
<body>
<div class="logo">
<img
src="https://krds-assignment.github.io/aoc/api-assets/logo-aoc.png"
/>
</div>
<section class="container">
<div class="card cardbg1">
</head> <div class="card-body">
<body>
<section class="cont">
<div class="card cardbg1">
<div class="card-desc">
<div class="card-text">
<img src="https://krds-assignment.github.io/aoc/api-assets/logo-f-secure.png">
<p class="title">Astonishing features requires worry-free security</p>
<hr>
<p>1 Year Free Mobile Security</p>
</div>
<div class="card-image">
<img src="https://krds-assignment.github.io/aoc/api-assets/image-1.png">
</div>
</div>
</div>
<div class="card cardbg2">
<div class="card-desc">
<div class="card-text"> <div class="card-text">
<img src="https://krds-assignment.github.io/aoc/api-assets/logo-digitainment.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/logo-f-secure.png"
/>
<p class="title">
Astonishing features requires worry-free security
</p>
<hr />
<p class="sub-title">1 YEAR FREE MOBILE SECURITY</p>
</div>
<div class="card-image">
<img
src="https://krds-assignment.github.io/aoc/api-assets/image-1.png"
/>
</div>
</div>
</div>
<div class="card cardbg2">
<div class="card-body">
<div class="card-text">
<img
src="https://krds-assignment.github.io/aoc/api-assets/logo-digitainment.png"
/>
<p class="title">Be hooked!</p> <p class="title">Be hooked!</p>
<hr> <hr />
<p>2000+ Movies from Bollywood</p> <p class="sub-title">2000+ MOVIES FROM BOLLYWOOD</p>
</div> </div>
<div class="card-image"> <div class="card-image">
<img src="https://krds-assignment.github.io/aoc/api-assets/image-2.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/image-2.png"
/>
</div>
</div> </div>
</div> </div>
<div class="card cardbg3">
</div> <div class="card-body">
<div class="card cardbg3">
<div class="card-desc">
<div class="card-text"> <div class="card-text">
<img src="https://krds-assignment.github.io/aoc/api-assets/logo-adaptxt.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/logo-adaptxt.png"
/>
<p class="title">The best things in life are free</p> <p class="title">The best things in life are free</p>
<hr> <hr />
<p>Free Mobile Pouch</p> <p class="sub-title">FREE MOBILE POUCH</p>
</div> </div>
<div class="card-image"> <div class="card-image">
<img src="https://krds-assignment.github.io/aoc/api-assets/image-3.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/image-3.png"
/>
</div>
</div> </div>
</div> </div>
</div> <div class="card cardbg4">
<div class="card cardbg4">
<div class="card-desc"> <div class="card-body">
<div class="card-text"> <div class="card-text">
<img src="https://krds-assignment.github.io/aoc/api-assets/logo-hungama.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/logo-hungama.png"
/>
<p class="title">The thump never ends here</p> <p class="title">The thump never ends here</p>
<hr> <hr />
<p>1000’s of songs</p> <p class="sub-title">1000’s OF SONGS</p>
</div> </div>
<div class="card-image"> <div class="card-image">
<img src="https://krds-assignment.github.io/aoc/api-assets/image-4.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/image-4.png"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="card cardbg5"> <div class="card cardbg5">
<div class="card-desc">
<div class="card-body">
<div class="card-text"> <div class="card-text">
<img src="https://krds-assignment.github.io/aoc/api-assets/logo-adaptxt.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/logo-adaptxt.png"
/>
<p class="title">Being globally you</p> <p class="title">Being globally you</p>
<hr> <hr />
<p>21 Indian & Foreign Languages</p> <p class="sub-title">21 INDIAN & FOREIGN LANGUAGES</p>
</div> </div>
<div class="card-image"> <div class="card-image">
<img src="https://krds-assignment.github.io/aoc/api-assets/image-5.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/image-5.png"
/>
</div>
</div> </div>
</div> </div>
</div> <div class="card cardbg6">
<div class="card cardbg6"> <div class="card-body">
<div class="card-desc">
<div class="card-text"> <div class="card-text">
<img src="https://krds-assignment.github.io/aoc/api-assets/logo-read-where.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/logo-read-where.png"
/>
<p class="title">For the wise</p> <p class="title">For the wise</p>
<hr> <hr />
<p>1000 pts Discount on Subscription</p> <p class="sub-title">1000 PTS DISCOUNT ON SUBSCRIPTION</p>
</div> </div>
<div class="card-image"> <div class="card-image">
<img src="https://krds-assignment.github.io/aoc/api-assets/image-6.png"> <img
src="https://krds-assignment.github.io/aoc/api-assets/image-6.png"
/>
</div> </div>
</div> </div>
</div>
</section> </div>
</body> </section>
</body>
</html> </html>
...@@ -2,89 +2,211 @@ ...@@ -2,89 +2,211 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
}
} body {
font-family: "Poppins", sans-serif;
}
.container {
display: grid;
grid-template-columns: repeat(3,1fr);
min-height: 100vh;
max-width: 1920px;
margin: 0 auto;
}
.card {
min-height: 50vh;
display: grid;
place-content: center;
}
.card-body {
display: grid;
grid-template-columns: repeat(2,1fr);
}
.cont { .card-text {
font-size: 18px;
display: grid; display: grid;
grid-template-columns: repeat(3,1fr); place-content: center;
min-height:100vh; }
.sub-title {
font-size: 15px;
}
}
.card{
width:100%;
} .card-text img,
.card p{ .logo img {
color:white height: 50px;
}
.card .card-text img{
height:50px;
object-fit: contain; object-fit: contain;
aspect-ratio: 3/2; aspect-ratio: 3/2;
} }
.card .card-image img{ .logo {
max-width:100%; position: absolute;
height: 300px; top: 3px;
object-fit:contain; left: 18px;
} }
.card-text{ .card-image img {
font-size: 18px; max-width: 100%;
max-height: 50vh;
display: block; /* it removes extra space */
} }
.card-desc{
display: grid;
align-items: center;
justify-content: center;
grid-template-columns: repeat(2,1fr);
padding: 30px 25px 0;
} .card p {
color: white;
}
.cardbg1 {
background: #41ca6e;
}
.cardbg2 {
background: #fab153;
}
.cardbg3 {
background: #7277d5;
}
.cardbg4 {
background: #f87d51;
}
.cardbg5 {
background: #ed5466;
}
.cardbg6 {
background: #4ec2e7;
}
hr{ hr {
width: 80%;
height: 2px; height: 2px;
border: none;
background-color: white; background-color: white;
} border: none;
margin: 10px 10px 10px 0px;
.cardbg1{
background:#41ca6e;
} }
.cardbg2{ @media only screen and (min-width: 320px), screen and (max-width: 573px) {
background:#fab153 .logo img {
max-width: 100%;
height: 40px;
}
} }
.cardbg3{
background:#7277d5; @media only screen and (max-width: 768px) {
.container {
display: grid;
grid-template-columns: 1fr;
min-height: calc(100vh - 67px);
}
.card .card-body {
display: grid;
grid-template-columns: 1fr;
place-items: center;
padding: 100px;
gap: 3em;
}
.logo {
position: relative;
background: white;
left: 0;
top: 0;
}
.logo img {
max-width: 100%;
height: 60px;
margin-left: 10px;
mix-blend-mode: exclusion;
background: black;
}
.card-text img {
height: 80px;
}
.card-text {
font-size: 34px;
font-family: "Poppins";
max-width: 60vw;
width: 100%;
}
.sub-title {
font-size: 25px;
}
.card-text .title {
font-weight: bold;
}
.card-text > p:first-of-type {
text-transform: uppercase;
}
.card-image img {
max-width: 100%;
height: auto;
}
} }
.cardbg4{ @media only screen and (min-width: 769px) {
background:#f87d51; .container {
display: grid;
grid-template-columns:repeat(2,1fr);
min-height: 50vh;
}
.card-body {
display: grid;
align-items: center;
justify-content: center;
padding-left: 50px;
}
.card-text{
width:100%;
font-size: 14px;
}
.card-text,
.sub-title {
font-size: 16px;
}
.card-image img{
padding: 22px;
} }
.cardbg5{ .container > div:nth-child(6) > .card-body .card-image img{
background:#ed5466;
padding: 0px;
} }
.cardbg6{
background:#4ec2e7;
} }
@media only screen and (min-width: 1023px) {
.container {
grid-template-columns: repeat(3,1fr);
}
/* small screen */ .logo img {
@media only screen and (max-width:768px){ height: 45px;
.cont, .card-desc{
grid-template-columns: repeat(1,1fr);
justify-items: center;
} }
.card-text,
.sub-title {
font-size: 14px;
} }
/* medium screen */
@media only screen and (min-width:769px) and (max-width:1024px){
.cont{
grid-template-columns: repeat(2,1fr); .card-body{
padding-left: 45px;
}
.card-image img{
padding:18px;
}
}
@media only screen and (min-width: 1441px) {
.card {
height: 50vh;
} }
.title,.sub-title{
font-size: 18px;
}
.card-body{
padding-left: 85px;
} }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment