Skip to content

Commit c0f83bf

Browse files
jeremymanningclaude
andcommitted
Fix brain image vertical centering on homepage
Use flexbox-based centering instead of transform-based positioning. The brain-wrapper now spans the full container and uses flexbox to center the brain image, providing true vertical centering regardless of the info button state. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b0533a4 commit c0f83bf

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

css/style.css

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -992,18 +992,22 @@ body.homepage main {
992992
width: 100%;
993993
height: 100%;
994994
max-width: 1200px;
995-
padding: 40px;
995+
padding: 0 40px;
996+
display: flex;
997+
align-items: center;
998+
justify-content: center;
996999
}
9971000

9981001
.brain-wrapper {
9991002
position: absolute;
1000-
top: calc(50% - 20px); /* Offset up to visually center in the green area above the menu */
1001-
left: 50%;
1002-
transform: translate(-50%, -50%);
1003-
transition: left 0.27s ease, transform 0.27s ease, top 0.27s ease;
1003+
top: 0;
1004+
left: 0;
1005+
right: 0;
1006+
bottom: 0;
10041007
display: flex;
10051008
align-items: center;
10061009
justify-content: center;
1010+
transition: all 0.27s ease;
10071011
}
10081012

10091013
.brain-image {
@@ -1066,8 +1070,9 @@ body.info-transitioning .brain-image {
10661070

10671071
/* Info Panel Active State - Gallery View */
10681072
body.info-active .brain-wrapper {
1069-
left: 27%;
1070-
top: 50%;
1073+
right: 50%;
1074+
justify-content: flex-end;
1075+
padding-right: 5%;
10711076
}
10721077

10731078
body.info-active .brain-image {

0 commit comments

Comments
 (0)