MediaWiki:Common.css: Difference between revisions

From WikiLegend
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
   background: #f9f9f9;
   background: #f9f9f9;
   border: 1px solid #aaa;
   border: 1px solid #aaa;
   width: 100%;
   width: 22em;
  max-width: 22em;
   font-size: 90%;
   font-size: 90%;
   box-sizing: border-box;
   text-align: left; /* Default text alignment for table content */
  margin: 0 auto 1em;
}
}


Line 15: Line 13:
   background: #d0e0f0;
   background: #d0e0f0;
   padding: 4px;
   padding: 4px;
  font-size: 1em;
}
}


.infobox td {
.infobox td {
   padding: 4px;
   padding: 4px;
  font-size: 1em;
}
}


.infobox img {
.infobox .image-cell {
   max-width: 100%;
   text-align: center; /* Explicitly center the image cell */
  height: auto;
  display: block;
  margin: 0 auto;
}
}


/* Responsive adjustments for smaller screens */
 
@media screen and (max-width: 600px) {
/* Hide 'View source' tab for non-logged-in users */
  .infobox {
body.action-viewsource .mw-editsection,
    font-size: 85%;
body.action-viewsource #ca-viewsource {
    max-width: 100%;
     display: none !important;
    margin: 0 auto; /* Explicitly center in mobile view */
    display: table; /* Ensure table behaves correctly */
  }
  .infobox th, .infobox td {
     padding: 3px;
  }
}
}

Latest revision as of 18:10, 4 June 2025

/* CSS placed here will be applied to all skins */

.infobox {
  border-collapse: collapse;
  background: #f9f9f9;
  border: 1px solid #aaa;
  width: 22em;
  font-size: 90%;
  text-align: left; /* Default text alignment for table content */
}

.infobox th {
  background: #d0e0f0;
  padding: 4px;
}

.infobox td {
  padding: 4px;
}

.infobox .image-cell {
  text-align: center; /* Explicitly center the image cell */
}


/* Hide 'View source' tab for non-logged-in users */
body.action-viewsource .mw-editsection,
body.action-viewsource #ca-viewsource {
    display: none !important;
}