No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
width: 160px; /* Fixed width for each grid item */ | width: 160px; /* Fixed width for each grid item */ | ||
height: 200px; /* Fixed height for each grid item */ | height: 200px; /* Fixed height for each grid item */ | ||
border-radius: 8px; | border-radius: 8px; /* Consistent rounded corners */ | ||
overflow: hidden; /* Ensures content stays within | overflow: hidden; /* Ensures child content stays within bounds */ | ||
background-color: rgba(0, 0, 0, 0.2); /* Light gray background for uniformity */ | background-color: rgba(0, 0, 0, 0.2); /* Light gray background for uniformity */ | ||
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 */ | ||
Line 26: | Line 26: | ||
justify-content: flex-start; /* Aligns items to the top */ | justify-content: flex-start; /* Aligns items to the top */ | ||
padding: 0; /* Removes padding */ | padding: 0; /* Removes padding */ | ||
flex-shrink: 0; /* Prevents flexbox from resizing items */ | flex-shrink: 0; /* Prevents flexbox from resizing items */ | ||
flex-basis: 160px; /* Ensures all items take up the same width */ | flex-basis: 160px; /* Ensures all items take up the same width */ | ||
transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effect */ | |||
} | } | ||
Line 35: | Line 35: | ||
height: 70%; /* Allocates 70% of the height to the image */ | height: 70%; /* Allocates 70% of the height to the image */ | ||
object-fit: cover; /* Ensures the image fills the area without distortion */ | object-fit: cover; /* Ensures the image fills the area without distortion */ | ||
border-radius: 8px 8px 0 0; /* Apply rounded corners only to the top of the image */ | |||
margin: 0; /* Removes extra margin */ | margin: 0; /* Removes extra margin */ | ||
} | } | ||
Line 51: | Line 52: | ||
overflow-wrap: break-word; /* Ensures long words wrap */ | overflow-wrap: break-word; /* Ensures long words wrap */ | ||
overflow: hidden; /* Prevents overflowing text */ | overflow: hidden; /* Prevents overflowing text */ | ||
border-radius: 0 0 8px 8px; /* Rounded corners for the bottom of the text area */ | |||
} | } |
Revision as of 06:45, 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: 10px; /* Adds spacing between grid items */
justify-content: center; /* Centers the items horizontally */
padding: 10px;
}
.nav-item {
position: relative; /* Enables positioning of child elements */
width: 160px; /* Fixed width for each grid item */
height: 200px; /* Fixed height for each grid item */
border-radius: 8px; /* Consistent rounded corners */
overflow: hidden; /* Ensures child content stays within bounds */
background-color: rgba(0, 0, 0, 0.2); /* Light gray background for uniformity */
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 */
align-items: center; /* Centers items horizontally */
justify-content: flex-start; /* Aligns items to the top */
padding: 0; /* Removes padding */
flex-shrink: 0; /* Prevents flexbox from resizing items */
flex-basis: 160px; /* Ensures all items take up the same width */
transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effect */
}
.nav-item img {
width: 100%; /* Ensures the image takes the full width of the container */
height: 70%; /* Allocates 70% of the height to the image */
object-fit: cover; /* Ensures the image fills the area without distortion */
border-radius: 8px 8px 0 0; /* Apply rounded corners only to the top of the image */
margin: 0; /* Removes extra margin */
}
.nav-item span {
display: block; /* Ensures the text takes full width */
width: 100%; /* Matches the width of the container */
height: 30%; /* Allocates 30% of the height to the text area */
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background for text */
color: #fff; /* White text color */
text-align: center; /* Centers the text horizontally */
font-size: 14px; /* Adjusts font size */
font-weight: bold; /* Makes the text bold */
line-height: 1.2; /* Adjusts line height for wrapped text */
padding: 10px; /* Adds padding inside the text area */
overflow-wrap: break-word; /* Ensures long words wrap */
overflow: hidden; /* Prevents overflowing text */
border-radius: 0 0 8px 8px; /* Rounded corners for the bottom of the text area */
}