Skip to content

Commit 83c66fe

Browse files
authored
Merge pull request #6964 from kishore08-07/fix-homepage-banner-responsive
reclaim dead space in home page banner (mobile view)
2 parents ea43155 + e469796 commit 83c66fe

3 files changed

Lines changed: 39 additions & 11 deletions

File tree

src/sections/Home/Banner-1/banner1.style.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,15 @@ const Banner1SectionWrapper = styled.section`
142142
}
143143
}
144144
@media only screen and (max-width: 760px) {
145-
padding: 2rem 0;
145+
min-height: 320px;
146+
padding: 1.2rem 0 1.5rem 0;
147+
.background-svg {
148+
width: 7.2rem;
149+
min-height: 9.6rem;
150+
top: 10px;
151+
right: -1.6rem;
152+
opacity: 0.7;
153+
}
146154
.section-title-wrapper {
147155
min-width: 100%;
148156
}
@@ -167,7 +175,15 @@ const Banner1SectionWrapper = styled.section`
167175
}
168176
}
169177
@media only screen and (max-width: 480px) {
170-
padding: 2rem 0;
178+
min-height: 220px;
179+
padding: 0.7rem 0 1rem 0;
180+
.background-svg {
181+
width: 9.6rem;
182+
min-height: 6.4rem;
183+
top: 30px;
184+
right: -2.88rem;
185+
opacity: 0.5;
186+
}
171187
.vintage-box{
172188
&:before{
173189
content: none;

src/sections/Home/Banner-2/banner2.style.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ const Banner2SectionWrapper = styled.section`
107107
}
108108
}
109109
@media only screen and (max-width: 760px) {
110-
padding: 2rem 0;
111-
background-position: bottom 100px right 10px, bottom right;
112-
background-size: 25%;
113-
110+
min-height: 320px;
111+
padding: 1.2rem 0 1.5rem 0;
112+
background-position: bottom 60px right 5px, bottom right;
113+
background-size: 2.88rem, 2.4rem;
114114
.section-title {
115115
h1 { margin: 0rem; }
116116
}
@@ -127,10 +127,10 @@ const Banner2SectionWrapper = styled.section`
127127
128128
}
129129
@media only screen and (max-width: 480px) {
130-
padding: 2rem 0;
131-
background-position: bottom 230px right 20px, bottom 180px right;
132-
background-size: 20%;
133-
130+
min-height: 180px;
131+
padding: 0.7rem 0 1rem 0;
132+
background-position: bottom 30px right 2px, bottom 10px right;
133+
background-size: 2.08rem, 1.6rem;
134134
.section-title{
135135
h1 {
136136
font-size: 35px;
@@ -143,7 +143,7 @@ const Banner2SectionWrapper = styled.section`
143143
content: none;
144144
}
145145
}
146-
}
146+
}
147147
@media screen and (max-width: 402px) {
148148
.banner-btn.one, .banner-btn.two
149149
{

src/sections/Home/Banner-4/banner4.style.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ const Banner1SectionWrapper = styled.section`
221221
}
222222
}
223223
@media only screen and (max-width: 767px) {
224+
min-height: 320px;
225+
padding: 1.2rem 0 1.5rem 0;
226+
.video-wrapper {
227+
width: 100%;
228+
padding-bottom: 56.25%; /* Maintain 16:9 aspect ratio */
229+
}
224230
.section-title-wrapper {
225231
min-width: 100%;
226232
}
@@ -251,6 +257,12 @@ const Banner1SectionWrapper = styled.section`
251257
}
252258
}
253259
@media only screen and (max-width: 480px) {
260+
min-height: 180px;
261+
padding: 0.7rem 0 1rem 0;
262+
.video-wrapper {
263+
width: 100%;
264+
padding-bottom: 60%;
265+
}
254266
padding: 2rem 0;
255267
.vintage-box{
256268
&:before{

0 commit comments

Comments
 (0)