diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-10-13 10:26:25 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-10-13 10:26:25 +0800 |
| commit | 3940683460a9d7bfd0573d588b62ee2ad9d175c0 (patch) | |
| tree | 68ea37f333286c3d14e9bee40c4d6a150d22857b /components/header.css | |
| parent | f16a40f49984cc32e7ff9fe51cc8ec177a7323cb (diff) | |
fix(header): fixed header not being centered
Diffstat (limited to 'components/header.css')
| -rw-r--r-- | components/header.css | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/components/header.css b/components/header.css index 057ad90..845168a 100644 --- a/components/header.css +++ b/components/header.css @@ -3,25 +3,27 @@ header { position: fixed; top: 2rem; left: 0; - /* width: 75%; */ - /* width: 100%; */ - /* max-width: fit-content; */ - /* margin-left: 12.5%; */ + right: 0; + margin-left: auto; + margin-right: auto; + width: 75%; /* Adjust width as needed */ height: var(--topBarHeight); - /* justify-content: fit-content; */ align-items: center; text-align: center; - /* background: color(0, 0, 0, .1); */ z-index: 1000; - /* background: rgba(0, 0, 0, 0.2); */ background-color: #000; border-radius: 32px; - transition: all 0.1s; -webkit-user-select: none; /* Safari */ -ms-user-select: none; /* IE 10 and IE 11 */ user-select: none; /* Standard syntax */ } +.navBar { + display: flex; + justify-content: space-between; + align-items: center; +} + .navBar a { font-family: var(--font-jetbrains); position: relative; @@ -47,6 +49,14 @@ header { .navBar .hleft a {float: left;} .navBar .hright a {float: right;} +.hleft, .hright { + display: flex; +} + +.hright { + gap: 1rem; /* Adjust the gap between links as needed */ +} + .navBar a::after { content: ''; position: fixed; @@ -101,7 +111,7 @@ header:hover, header:active, #navBarHeader:active, .navBar:active { - transform: scale(1.05); + transform: scale(1.01); /* transition: transform 700ms; */ } |
