Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css

MediaWiki interface page
Revision as of 00:53, 10 December 2024 by Admin (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* General Section Styling */
.featured-section {
    max-width: 1200px; /* Restrict maximum width */
    margin: auto; /* Center the section */
    padding: 10px;
    text-align: center;
    font-family: 'Lora', serif;
    color: #fff;
}

/* Background color section */
.featured-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #f5eccc; /* Optional: Subtle gold for title */
}

/* Featured Grid */
.featured-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 items per row */
    gap: 15px; /* Space between grid items */
    justify-items: center; /* Center items within their grid cells */
}

/* Featured Item */
.featured-item {
    position: relative; /* Parent container for card content */
    width: 300px; /* Fixed width for each card */
    height: 300px; /* Fixed height to keep cards square */
    overflow: hidden;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add subtle shadow */
    background-color: #222; /* Fallback color for card background */
}

/* Image Container */
.image-container {
    position: relative; /* For positioning child elements absolutely */
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent overflow of child elements */
}

/* Ensures the image fills the container fully */
.grid-img {
    position: absolute; /* Ensures the image fills the container */
    top: 0;
    left: 0;
    width: 100%; /* Stretch image to container width */
    height: 100%; /* Stretch image to container height */
    object-fit: cover; /* Maintains aspect ratio while filling */
    margin: 0; /* Removes any unwanted margins */
    padding: 0; /* Removes padding */
}

/* Card Label */
.card-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(245, 236, 204, 0.9); /* Light gold, semi-transparent */
    color: #333;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 2; /* Ensure it stays above the image */
    pointer-events: none; /* Prevent interactions with the label */
}

/* Card Description */
.overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; /* Span the full width of the card */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    color: #fff; /* White text for contrast */
    font-size: 14px;
    padding: 10px;
    text-align: center;
    z-index: 2; /* Ensure it appears above the image */
    overflow-wrap: break-word; /* Break long words */
    line-height: 1.4; /* Adjust line height for readability */
}