Skip to content

Commit b17ce02

Browse files
committed
chore: relative section sizing
1 parent f3930dd commit b17ce02

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

src/styles/main_about.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@
3838
display: flex;
3939
justify-content: space-between;
4040
align-items: center;
41-
min-height: 100vh;
41+
min-height: 100dvh;
4242
gap: 50px;
4343
flex-wrap: wrap;
44-
border-top: 2px solid #ccc;
4544
}
4645

4746
#about .about-text,

src/styles/main_body.css

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,20 @@ body {
3838

3939
/* HERO (first section) */
4040
.hero {
41-
margin-top: 120px;
41+
min-height: 100dvh;
42+
padding-top: 120px;
4243
/* leave room for navbar */
4344
display: flex;
4445
justify-content: space-around;
4546
align-items: center;
4647
text-align: left;
47-
padding: 2rem;
48+
padding-left: 2rem;
49+
padding-right: 2rem;
50+
padding-bottom: 2rem;
4851
gap: 3rem;
49-
/* border-bottom: 2px solid #ccc; divider for first section */
52+
border-bottom: 2px solid #ccc; /* divider for first section */
53+
box-sizing: border-box;
54+
width: 100%;
5055
}
5156

5257
#slideshow {
@@ -67,7 +72,7 @@ body {
6772

6873
/* Section styling + dividers */
6974
section:not(#footer-new) {
70-
min-height: 100vh;
75+
min-height: 100dvh;
7176
display: flex;
7277
justify-content: center;
7378
align-items: center;
@@ -77,6 +82,8 @@ section:not(#footer-new) {
7782
color: #ffffff;
7883
border-bottom: 2px solid #ccc;
7984
/* divider for all sections */
85+
box-sizing: border-box;
86+
width: 100%;
8087
}
8188

8289
/* Explicit divider for #about too (redundant but ensures consistency) */
@@ -91,9 +98,12 @@ section:not(#footer-new) {
9198
justify-content: center;
9299
text-align: center;
93100
gap: 2rem;
94-
margin-top: 80px;
101+
padding-top: 80px;
95102
/* reduced for navbar */
96-
padding: 1.5rem 1rem;
103+
padding-left: 1rem;
104+
padding-right: 1rem;
105+
padding-bottom: 1.5rem;
106+
min-height: 100dvh;
97107
}
98108

99109
/* Slideshow fixed box */
@@ -112,6 +122,7 @@ section:not(#footer-new) {
112122
section {
113123
font-size: 1.8rem;
114124
padding: 2rem 1rem;
125+
min-height: 100dvh;
115126
}
116127
}
117128

src/styles/main_projects.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
flex-direction: column;
3939
align-items: center;
4040
gap: 20px;
41-
min-height: 100vh;
41+
min-height: 100dvh;
4242
width: 100%;
4343
}
4444

0 commit comments

Comments
 (0)