MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
.mw-logo-icon { | .mw-logo-icon { | ||
background-color: white; /* Set background to white */ | background-color: white; /* Set background to white */ | ||
| Line 8: | Line 7: | ||
align-items: center; /* Center content vertically */ | align-items: center; /* Center content vertically */ | ||
justify-content: center; /* Center content horizontally */ | justify-content: center; /* Center content horizontally */ | ||
overflow: hidden; /* Prevent overflow if necessary */ | |||
position: relative; /* Positioning context for child elements */ | |||
} | } | ||
.mw-logo-icon img { | |||
width: 100%; /* Ensure the image fits within the circle */ | |||
height: auto; /* Maintain aspect ratio */ | |||
position: absolute; /* Positioning to avoid overflow */ | |||
top: 50%; /* Center vertically */ | |||
left: 50%; /* Center horizontally */ | |||
transform: translate(-50%, -50%); /* Adjust for centering */ | |||
} | } | ||
Revision as of 17:34, 5 September 2025
.mw-logo-icon {
background-color: white; /* Set background to white */
width: 100px; /* Set width to your desired size */
height: 100px; /* Set height to the same value as width */
border-radius: 50%; /* Make it a circle */
display: flex; /* Center content if needed */
align-items: center; /* Center content vertically */
justify-content: center; /* Center content horizontally */
overflow: hidden; /* Prevent overflow if necessary */
position: relative; /* Positioning context for child elements */
}
.mw-logo-icon img {
width: 100%; /* Ensure the image fits within the circle */
height: auto; /* Maintain aspect ratio */
position: absolute; /* Positioning to avoid overflow */
top: 50%; /* Center vertically */
left: 50%; /* Center horizontally */
transform: translate(-50%, -50%); /* Adjust for centering */
}