Template:Ai/infobox.css: Difference between revisions
Appearance
Dascent-wiki (talk | contribs) Created page with "→Infobox Container: .infobox { width: 300px; background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); →Dark gradient background: border-radius: 12px; overflow: hidden; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); color: #e2e8f0; →Light text color: border: 1px solid rgba(255, 255, 255, 0.1); max-width: 90%; →Ensure responsiveness on smaller screens: ..." |
Dascent-wiki (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
/* Infobox Container */ | /* Infobox Container */ | ||
.infobox { | |||
width: 300px; | |||
background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); /* Dark gradient background */ | |||
border-radius: 12px; | |||
overflow: hidden; | |||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); | |||
color: #e2e8f0; /* Light text color */ | |||
border: 1px solid rgba(255, 255, 255, 0.1); | |||
margin: 1em auto; /* Center the infobox and add vertical margin */ | |||
float: right; /* Float to the right, common for infoboxes */ | |||
clear: right; /* Clear any floats before it */ | |||
font-size: 90%; /* Smaller font size for infobox content */ | |||
line-height: 1.4; | |||
box-sizing: border-box; /* Include padding/border in element's total width */ | |||
} | |||
/* Header */ | |||
.infobox-header { | |||
background-color: #4a5568; /* Slightly lighter dark header */ | |||
padding: 0.8em; | |||
text-align: center; | |||
font-size: 1.2em; | |||
font-weight: bold; | |||
color: #ffffff; | |||
border-bottom: 1px solid rgba(255, 255, 255, 0.15); | |||
} | |||
/* Logo Section */ | |||
.infobox-logo { | |||
padding: 0.8em; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
background-color: #2d3748; /* Darker background for logo */ | |||
border-bottom: 1px solid rgba(255, 255, 255, 0.1); | |||
} | |||
.infobox-logo img { | |||
max-width: 150px; | |||
height: auto; | |||
border-radius: 8px; | |||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); | |||
display: block; | |||
} | |||
/* Content Area */ | |||
.infobox-content { | |||
padding: 1em; | |||
} | |||
/* Individual Row in Content */ | |||
.infobox-row { | |||
display: flex; /* Use flexbox for layout */ | |||
justify-content: space-between; | |||
align-items: flex-start; | |||
margin-bottom: 0.6em; | |||
} | |||
.infobox-row:last-child { | |||
margin-bottom: 0; /* No margin for the last row */ | |||
} | |||
/* Label for each row */ | |||
.infobox-label { | |||
font-weight: bold; | |||
color: #cbd5e0; | |||
flex-shrink: 0; /* Prevent shrinking */ | |||
margin-right: 0.8em; | |||
white-space: nowrap; /* Keep label on one line */ | |||
} | |||
/* Value for each row */ | |||
.infobox-value { | |||
text-align: right; | |||
color: #e2e8f0; | |||
word-break: break-word; /* Allow long words to break */ | |||
flex-grow: 1; /* Allow value to take up remaining space */ | |||
} | |||
.infobox-value a { | |||
color: #63b3ed; /* Link color */ | |||
text-decoration: none; | |||
} | |||
.infobox-value a:hover { | |||
color: #90cdf4; /* Lighter link color on hover */ | |||
text-decoration: underline; | |||
} | |||
/* Footer */ | |||
.infobox-footer { | |||
padding: 0.8em; | |||
text-align: center; | |||
font-size: 0.9em; | |||
color: #a0aec0; | |||
border-top: 1px solid rgba(255, 255, 255, 0.08); | |||
background-color: #2d3748; | |||
} | } | ||
/* Responsive adjustments for smaller screens */ | |||
@media (max-width: 600px) { | |||
.infobox { | |||
width: 100%; | |||
float: none; /* Don't float on small screens */ | |||
margin-left: auto; | |||
margin-right: auto; | |||
} | |||
} | |||
Revision as of 17:17, 3 August 2025
/* Infobox Container */
.infobox {
width: 300px;
background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); /* Dark gradient background */
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
color: #e2e8f0; /* Light text color */
border: 1px solid rgba(255, 255, 255, 0.1);
margin: 1em auto; /* Center the infobox and add vertical margin */
float: right; /* Float to the right, common for infoboxes */
clear: right; /* Clear any floats before it */
font-size: 90%; /* Smaller font size for infobox content */
line-height: 1.4;
box-sizing: border-box; /* Include padding/border in element's total width */
}
/* Header */
.infobox-header {
background-color: #4a5568; /* Slightly lighter dark header */
padding: 0.8em;
text-align: center;
font-size: 1.2em;
font-weight: bold;
color: #ffffff;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
/* Logo Section */
.infobox-logo {
padding: 0.8em;
display: flex;
justify-content: center;
align-items: center;
background-color: #2d3748; /* Darker background for logo */
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.infobox-logo img {
max-width: 150px;
height: auto;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
display: block;
}
/* Content Area */
.infobox-content {
padding: 1em;
}
/* Individual Row in Content */
.infobox-row {
display: flex; /* Use flexbox for layout */
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.6em;
}
.infobox-row:last-child {
margin-bottom: 0; /* No margin for the last row */
}
/* Label for each row */
.infobox-label {
font-weight: bold;
color: #cbd5e0;
flex-shrink: 0; /* Prevent shrinking */
margin-right: 0.8em;
white-space: nowrap; /* Keep label on one line */
}
/* Value for each row */
.infobox-value {
text-align: right;
color: #e2e8f0;
word-break: break-word; /* Allow long words to break */
flex-grow: 1; /* Allow value to take up remaining space */
}
.infobox-value a {
color: #63b3ed; /* Link color */
text-decoration: none;
}
.infobox-value a:hover {
color: #90cdf4; /* Lighter link color on hover */
text-decoration: underline;
}
/* Footer */
.infobox-footer {
padding: 0.8em;
text-align: center;
font-size: 0.9em;
color: #a0aec0;
border-top: 1px solid rgba(255, 255, 255, 0.08);
background-color: #2d3748;
}
/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
.infobox {
width: 100%;
float: none; /* Don't float on small screens */
margin-left: auto;
margin-right: auto;
}
}