MediaWiki:Common.css: Difference between revisions

mNo edit summary
Tag: Reverted
mNo edit summary
Tag: Reverted
Line 62: Line 62:
}
}


/* Center the actual notice element with the desired width */
/* Center the body of the dismissable notice */
.vector-sitenotice-container .notice.hide-for-print.curved.dismissible-notice {
.vector-sitenotice-container .mw-dismissable-notice-body {
    display: block;
     margin-left: auto;
     margin-left: auto;
     margin-right: auto;
     margin-right: auto;
Line 70: Line 69:
}
}


/* Ensure the dismissable notice has relative positioning */
/* Ensure the dismissable notice has relative positioning for the button */
.vector-sitenotice-container .mw-dismissable-notice {
.vector-sitenotice-container .mw-dismissable-notice {
     position: relative;
     position: relative;
     display: inline-block;
     display: inline-block; /* May help with centering */
}
 
/* Position the close button */
.vector-sitenotice-container .mw-dismissable-notice-close {
    position: absolute;
    top: 0.5em; /* Adjust as needed */
    right: 0.5em; /* Adjust as needed */
    cursor: pointer;
}
}


/* Center the mw-dismissable-notice within its container */
/* Ensure the vector-sitenotice-container takes full width and centers content */
.vector-sitenotice-container {
.vector-sitenotice-container {
     text-align: center;
     width: 100%; /* Take full width */
}
     text-align: center; /* Center inline(-block) children */
 
/* Remove the margin auto from the body that was causing the issue */
.vector-sitenotice-container .mw-dismissable-notice-body {
     /* margin-left: auto; */ /* Remove this */
    /* margin-right: auto; */ /* Remove this */
}
}