Skip to content

Commit d09680d

Browse files
Merge pull request #17 from rignitc/relv-sizing
feat: relative sizing of section on hero page
2 parents f3930dd + 23cc3c0 commit d09680d

3 files changed

Lines changed: 22 additions & 10 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: 20 additions & 7 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,8 @@ body {
6772

6873
/* Section styling + dividers */
6974
section:not(#footer-new) {
70-
min-height: 100vh;
75+
min-height: 100dvh;
76+
scroll-margin-top: 120px;
7177
display: flex;
7278
justify-content: center;
7379
align-items: center;
@@ -77,6 +83,8 @@ section:not(#footer-new) {
7783
color: #ffffff;
7884
border-bottom: 2px solid #ccc;
7985
/* divider for all sections */
86+
box-sizing: border-box;
87+
width: 100%;
8088
}
8189

8290
/* Explicit divider for #about too (redundant but ensures consistency) */
@@ -91,9 +99,12 @@ section:not(#footer-new) {
9199
justify-content: center;
92100
text-align: center;
93101
gap: 2rem;
94-
margin-top: 80px;
102+
padding-top: 80px;
95103
/* reduced for navbar */
96-
padding: 1.5rem 1rem;
104+
padding-left: 1rem;
105+
padding-right: 1rem;
106+
padding-bottom: 1.5rem;
107+
min-height: 100dvh;
97108
}
98109

99110
/* Slideshow fixed box */
@@ -109,9 +120,11 @@ section:not(#footer-new) {
109120
}
110121

111122
/* Sections smaller */
112-
section {
123+
section:not(#footer-new) {
113124
font-size: 1.8rem;
114125
padding: 2rem 1rem;
126+
min-height: 100dvh;
127+
scroll-margin-top: 80px;
115128
}
116129
}
117130

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)