MediaWiki:Common.css: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 379: Line 379:
}
}
#related-articles {
#related-articles {
     display: flex; /* Enable Flexbox */
     display: flex;
     flex-wrap: wrap; /* Allow wrapping to next line */
     flex-wrap: wrap;
     margin-top: 20px; /* Space above the related articles */
     margin: 0 auto;
     margin-right: 5%;
     margin-top: 20px;
    position: relative; /* Needed for absolute positioning of pseudo-element */
}
#related-articles::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    border-left: 1px solid black; /* Single border in the middle */
    z-index: 1; /* Ensure it's above the articles */
}
}
.related-article {
.related-article {
     flex: 1 1 50%; /* Flex grow, flex shrink, and base width */
     width: calc(50% - 1px); /* Adjust for two articles per row */
     box-sizing: border-box;
     box-sizing: border-box;
     border: 1px solid black; /* Border on all sides */
     border: 1px solid black;
    height: fit-content;
     padding: 7px;
     padding: 7px;
     margin-bottom: 30px;
     margin-bottom: 30px;
Line 404: Line 396:
     letter-spacing: 0.4px;
     letter-spacing: 0.4px;
     cursor: pointer;
     cursor: pointer;
    height: fit-content;
}
}
.related-article:nth-child(odd) {
 
     margin-right: -1px; /* Overlap right border of the left column */
.related-article:not(:first-child) {
     margin-left: -1px;
}
 
.related-article:nth-child(2n + 1) {
    margin-left: 0;
}
}


.related-article:nth-child(even) {
.related-article:last-child {
     margin-left: -1px; /* Overlap left border of the right column */
     margin-right: 0;
}
}
.related-article-entry-number {
.related-article-entry-number {

Navigation menu