MediaWiki:Common.css: Difference between revisions

From abbyversewiki.irkanien.de
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 17: Line 17:
}
}


/* Place the Table of Contents to the left without overlapping text */
/* Create a wrapper to control the layout of ToC and infoboxes */
.mw-content-wrapper {
    display: flex;
    justify-content: center; /* Centers the content block */
    position: relative;
}
 
/* Place the Table of Contents to the left, outside the text flow */
#toc {
#toc {
     float: left;
     position: absolute;
    left: -280px; /* Adjust as needed to move it further left */
    top: 0;
     width: 250px;
     width: 250px;
    margin-right: 20px;
     background: #f9f9f9;
     background: #f9f9f9;
     padding: 15px;
     padding: 15px;
     border: 1px solid #aaa;
     border: 1px solid #aaa;
    clear: left; /* Prevents text overlap */
}
}


/* Ensure floating elements (infoboxes, images, etc.) stay to the right without overlapping text */
/* Place infoboxes to the right, outside the text flow */
.floatright, .thumb, .infobox {
.floatright, .thumb, .infobox {
     float: right;
     position: absolute;
    right: -280px; /* Adjust as needed to move it further right */
    top: 0;
     width: 250px;
     width: 250px;
     margin-left: 20px;
     margin-left: 20px;
    clear: right; /* Prevents text overlap */
}
}



Revision as of 18:30, 7 February 2025

/* Limit the width of the main content area and center the entire article content */
.mw-body-content {
    max-width: 800px; /* Adjust this as needed */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Adds some spacing on the sides */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* Ensure proper positioning */
}

/* Ensure the article text itself is still left-aligned within the centered block */
.mw-parser-output {
    text-align: left;
    width: 100%;
}

/* Create a wrapper to control the layout of ToC and infoboxes */
.mw-content-wrapper {
    display: flex;
    justify-content: center; /* Centers the content block */
    position: relative;
}

/* Place the Table of Contents to the left, outside the text flow */
#toc {
    position: absolute;
    left: -280px; /* Adjust as needed to move it further left */
    top: 0;
    width: 250px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #aaa;
}

/* Place infoboxes to the right, outside the text flow */
.floatright, .thumb, .infobox {
    position: absolute;
    right: -280px; /* Adjust as needed to move it further right */
    top: 0;
    width: 250px;
    margin-left: 20px;
}

/* Make sure tables don't get squeezed */
.wikitable {
    width: auto;
    max-width: 100%; /* Ensures tables don't break */
}