CSS For Home Page
CSS For Home Page
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: #f8f8f8;
color: #333;
}
a {
text-decoration: none;
color: inherit;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
/* Header Styling */
.main-header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #ffffff;
padding: 15px 30px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
flex-wrap: wrap; /* Allow header items to wrap on smaller screens */
}
.header-left {
justify-content: flex-start;
}
.header-center {
justify-content: center;
flex-grow: 2; /* Search bar can take more space */
}
.header-right {
justify-content: flex-end;
}
/* Logo */
.logo {
display: flex;
align-items: center;
font-size: 1.8em;
font-weight: bold;
color: #007bff; /* A prominent blue */
margin-right: 30px;
}
.logo img {
height: 40px; /* Adjust logo size */
margin-right: 10px;
}
/* Main Navigation */
.main-nav ul {
display: flex;
gap: 25px; /* Space between links */
}
.main-nav a {
color: #555;
font-weight: 500;
transition: color 0.3s ease;
}
.main-nav a:hover {
color: #007bff;
}
/* Search Bar */
.search-bar {
display: flex;
border: 1px solid #ddd;
border-radius: 25px;
overflow: hidden;
width: 100%;
max-width: 500px; /* Max width for search bar */
}
.search-bar input[type="text"] {
border: none;
padding: 10px 20px;
flex-grow: 1;
outline: none;
font-size: 1em;
}
.search-bar button {
background-color: #007bff;
color: white;
border: none;
padding: 10px 15px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.search-bar button:hover {
background-color: #0056b3;
}
/* Auth Section */
.auth-section {
display: flex;
align-items: center;
gap: 15px;
flex-wrap: wrap; /* Allow wrapping for signup options */
justify-content: flex-end;
}
.login-btn {
background-color: #007bff;
color: white;
padding: 8px 15px;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s ease;
white-space: nowrap; /* Prevent text wrapping */
}
.login-btn:hover {
background-color: #0056b3;
}
.signup-options {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 5px;
}
.signup-options span {
font-size: 0.9em;
color: #666;
white-space: nowrap;
}
.social-signup-buttons {
display: flex;
gap: 8px;
flex-wrap: wrap; /* Allow social buttons to wrap */
justify-content: flex-end;
}
.social-btn {
background-color: #f0f0f0;
border: 1px solid #ccc;
padding: 6px 12px;
border-radius: 5px;
cursor: pointer;
font-size: 0.9em;
display: flex;
align-items: center;
gap: 5px;
transition: background-color 0.3s ease;
white-space: nowrap;
}
.social-btn:hover {
background-color: #e0e0e0;
}
.main-footer {
background-color: #333;
color: white;
text-align: center;
padding: 20px;
margin-top: 30px;
}
.header-center {
order: 3; /* Move search below navigation and auth */
}
.header-right {
order: 2; /* Move auth below navigation */
}
.main-nav ul {
flex-wrap: wrap; /* Allow navigation links to wrap */
gap: 15px;
}
.auth-section {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.social-signup-buttons {
justify-content: flex-start;
}
.logo {
margin-bottom: 10px;
margin-right: 0;
}
}