Skip to content

Commit

Permalink
Update Header.css
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsFlem authored Oct 23, 2024
1 parent 5dd9edf commit f64963d
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions src/components/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ header {
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, #dad9d9, #bfbebe);
padding: 10px 20px; /* Adjust padding to give a balanced look */
padding: 0 2.5%; /* Adjust padding to be proportional */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
z-index: 1000;
height: 5vh; /* Set header height to 5% of the viewport height */
height: 5vh; /* Header takes up 5% of the viewport height */
overflow: hidden;
}

/* Logo container to hold both the image and the text */
Expand All @@ -22,14 +23,13 @@ header {

/* Logo image styling */
.logo-image {
max-height: 80%; /* Set max height relative to header */
max-height: 4vh; /* Limit logo height to ensure it fits within header */
width: auto; /* Maintain aspect ratio */
}

/* Logo text styling */
.logo-text {
font-size: 2.5vw; /* Adjust this value to scale the text */
white-space: nowrap; /* Prevent text wrapping */
font-size: 2.5vh; /* Scale text size to fit better within header */
font-family: "Space Grotesk", sans-serif; /* Ensure font family is consistent */
font-weight: bold;
color: #333;
Expand All @@ -46,37 +46,53 @@ nav ul {
nav a {
font-family: "Space Grotesk", sans-serif;
font-weight: 400;
font-size: 16px; /* Use a more manageable font size */
font-size: 2.5vh; /* Scale link font size */
text-decoration: none;
color: #333;
position: relative;
transition: color 0.3s ease-in-out;
white-space: nowrap; /* Prevent navigation text from wrapping */
white-space: nowrap;
}

nav a:hover {
color: #000;
}

/* Underline effect on hover */
nav a::after {
content: "";
position: absolute;
width: 0;
height: 2px;
bottom: -5px;
left: 0;
background-color: #333;
transition: width 0.3s ease-in-out;
}

nav a:hover::after {
width: 100%;
}

/* Responsive styles */
@media (max-width: 768px) {
header {
flex-direction: column;
align-items: flex-start;
height: auto; /* Let the height adjust naturally on smaller screens */
flex-direction: row; /* Keep the header items in a row */
align-items: center;
padding: 0 5%; /* Adjust padding for smaller screens */
height: 5vh; /* Maintain height of 5% on mobile */
}

.logo-text {
font-size: 4vw; /* Increase size for smaller screens */
margin-bottom: 10px;
font-size: 2.5vh; /* Adjust size for smaller screens */
}

nav ul {
flex-direction: column;
gap: 10px;
flex-direction: row; /* Keep navigation in a row */
gap: 15px; /* Reduce gap for smaller screens */
}

nav a {
font-size: 16px; /* Maintain manageable size */
font-size: 2.5vh; /* Scale link font size for smaller devices */
}
}

0 comments on commit f64963d

Please sign in to comment.