Skip to content

Commit b284a16

Browse files
committed
Fix viewport height responsiveness for small windows
- Added responsive behavior for viewports with max-height 600px - Ensured title visibility when window is resized to quarter-screen (480x270) - Added flexible hero section padding and positioning - Reduced font sizes for small viewport heights (h1: 2.8rem, h2: 1.4rem) - Changed alignment to flex-start with proper padding for small screens - Maintains centered layout on larger screens while adapting to constrained heights
1 parent 7ee91d9 commit b284a16

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

style.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,23 @@ body {
278278
/* Hero Section */
279279
.hero {
280280
min-height: 100vh;
281+
height: auto;
281282
display: flex;
282283
align-items: center;
283284
justify-content: center;
284285
position: relative;
285286
overflow: hidden;
286287
background: var(--light-gradient);
288+
padding: 60px 0;
289+
}
290+
291+
@media (max-height: 600px) {
292+
.hero {
293+
min-height: auto;
294+
padding: 40px 0;
295+
align-items: flex-start;
296+
padding-top: 80px;
297+
}
287298
}
288299

289300
.hero::before {
@@ -307,6 +318,14 @@ body {
307318
flex-direction: column;
308319
align-items: center;
309320
justify-content: center;
321+
width: 100%;
322+
}
323+
324+
@media (max-height: 600px) {
325+
.hero-content {
326+
justify-content: flex-start;
327+
padding-top: 20px;
328+
}
310329
}
311330

312331
/* Desktop Hero */
@@ -335,6 +354,18 @@ body {
335354
line-height: 1.2;
336355
}
337356

357+
@media (max-height: 600px) {
358+
.desktop-hero h1 {
359+
font-size: 2.8rem;
360+
margin-bottom: 15px;
361+
}
362+
363+
.desktop-hero h2 {
364+
font-size: 1.4rem;
365+
margin-bottom: 20px;
366+
}
367+
}
368+
338369
.desktop-hero h2 {
339370
font-size: 1.8rem;
340371
font-weight: var(--font-weight-semibold);

0 commit comments

Comments
 (0)