Skip to content

Commit 7b5e0f2

Browse files
authored
Merge pull request #210 from horizenight/fix/thirdgrid
fix:Third Grid Responsiveness
2 parents 6d120a3 + 390aedb commit 7b5e0f2

2 files changed

Lines changed: 32 additions & 10 deletions

File tree

src/components/Landing/LandingSection/LandingSection.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
Para1,
1414
SectionTwo,
1515
Div2,
16+
Div3,
1617
Para,
1718
Image2,
1819
SectionOH1,
@@ -44,13 +45,13 @@ function LandingSection() {
4445
</Para>
4546
<Image2 src={landingpage.section2.img.src} alt={landingpage.section2.img.alt} />
4647
</Div2>
47-
<Div2>
48+
<Div3>
4849
<Image2 src={landingpage.section3.img.src} alt={landingpage.section3.img.alt} />
4950
<Para>
5051
<SectionTH2>{landingpage.section3.head}</SectionTH2>
5152
<Para2>{landingpage.section3.para}</Para2>
5253
</Para>
53-
</Div2>
54+
</Div3>
5455
</SectionTwo>
5556
</>
5657
);

src/components/Landing/LandingSection/styles.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import styled from 'styled-components';
22

33
export const SectionOne = styled.section`
44
margin-top: 5rem;
5-
margin-bottom: 4em;
5+
margin-bottom: 5em;
66
text-align: center;
7-
display: grid;
8-
justify-items: center;
7+
display: grid;
8+
justify-content: center;
99
`;
1010

1111
export const CardContainer = styled.div`
12-
display: flex;
13-
justify-content: center;
14-
flex-wrap: wrap;
12+
display: grid;
13+
grid-template-columns: repeat(3, minmax(0, 1fr));
14+
justify-content: start;
1515
gap: 1rem;
1616
padding: 1rem;
1717
`;
@@ -23,7 +23,6 @@ export const Card = styled.div`
2323
border-style: none;
2424
text-align: center;
2525
align-items: center;
26-
width: 22em;
2726
`;
2827

2928
export const ImageHeader = styled.img`
@@ -46,10 +45,28 @@ export const SectionTwo = styled.section`
4645

4746
export const Div2 = styled.div`
4847
display: flex;
49-
flex-wrap: wrap;
48+
flex-wrap:wrap;
49+
padding: 0.5rem 0rem;
5050
justify-content: center;
5151
align-items: center;
5252
gap: 4rem;
53+
54+
@media (max-width: 800px) {
55+
gap:5rem;
56+
}
57+
`;
58+
export const Div3 = styled.div`
59+
display: flex;
60+
flex-wrap:wrap;
61+
padding: 0.5rem 0rem;
62+
justify-content: center;
63+
align-items: center;
64+
gap: 4rem;
65+
66+
@media (max-width: 800px) {
67+
flex-direction:column-reverse;
68+
gap:5rem;
69+
}
5370
`;
5471

5572
export const Para = styled.div`
@@ -89,4 +106,8 @@ export const Section2P = styled.p`
89106
export const SectionTH2 = styled.h2`
90107
font-size: 1.5rem;
91108
font-weight: 900;
109+
110+
@media (max-width: 800px) {
111+
font-size: 1.25rem;
112+
}
92113
`;

0 commit comments

Comments
 (0)