No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
position: relative; /* Enables positioning of child elements */ | position: relative; /* Enables positioning of child elements */ | ||
width: 150px; /* Fixed width for each grid item */ | width: 150px; /* Fixed width for each grid item */ | ||
height: | height: auto; /* Adjusts height based on content */ | ||
border-radius: 8px; | border-radius: 8px; | ||
overflow: hidden; /* Ensures content stays within the bounds */ | overflow: hidden; /* Ensures content stays within the bounds */ | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow effect */ | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow effect */ | ||
display: flex; | |||
flex-direction: column; /* Stacks the image and text vertically */ | |||
justify-content: flex-start; /* Aligns items to the top */ | |||
align-items: center; /* Centers items horizontally */ | |||
padding: 0; /* Removes padding */ | |||
background-color: rgba(0, 0, 0, 0.2); /* Light gray background for the nav-item */ | |||
} | } | ||
Revision as of 06:37, 25 November 2024
/* Main page background */
body.page-Main_Page {
background: url('https://predictive-pulse.com/images/5ean444_winter_cabin_forest_snow_night_sky_stars_peaceful_reali_fc7e7992-0c1e-4564-bf78-2930ff9dc2f9.png') no-repeat center center fixed;
background-size: cover;
}
.mainpage-navigation {
display: flex;
flex-wrap: wrap; /* Allows items to wrap to the next line */
gap: 20px; /* Adds spacing between grid items */
justify-content: center; /* Centers the items horizontally */
padding: 20px;
}
/* .nav-item defines the layout and visual boundary of the grid item. */
.nav-item {
position: relative; /* Enables positioning of child elements */
width: 150px; /* Fixed width for each grid item */
height: auto; /* Adjusts height based on content */
border-radius: 8px;
overflow: hidden; /* Ensures content stays within the bounds */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow effect */
display: flex;
flex-direction: column; /* Stacks the image and text vertically */
justify-content: flex-start; /* Aligns items to the top */
align-items: center; /* Centers items horizontally */
padding: 0; /* Removes padding */
background-color: rgba(0, 0, 0, 0.2); /* Light gray background for the nav-item */
}
/* The img fills the top part of the .nav-item with the relevant image. */
.nav-item img {
width: 100%; /* Ensure the image takes full width of the parent container */
height: 100%; /* Maintain aspect ratio */
object-fit: cover; /* Ensures the image covers the area */
margin: 0; /* Remove extra margin */
}
/* The span sits below the image, aligned centrally, displaying the text. */
.nav-item span {
display: block; /* Ensures the text takes full width */
padding: 5px; /* Adds spacing inside the text box */
text-align: center; /* Centers the text */
font-size: 14px; /* Adjusts font size */
font-weight: bold; /* Makes the text bold */
color: #fff; /* White text color */
word-wrap: break-word; /* Ensures long words break to the next line */
overflow-wrap: anywhere; /* Wraps text inside the bounds */
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background for text */
width: 100%; /* Matches the width of the container */
margin: 0; /* Removes extra margin */
line-height: 1.2; /* Improves spacing for wrapped text */
}
/* Footer style */
.main-footer {
text-align: center;
margin-top: 20px;
padding: 10px;
background-color: rgba(0, 0, 0, 0.7);
color: #fff;
border-radius: 12px;
}