MediaWiki:Common.css: Difference between revisions

From The Political Machine - Official Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
}
}


.cards-container {
.card-container {
   display: flex; /* Use flexbox to layout cards horizontally */
   position: relative;
   flex-wrap: wrap; /* Allow cards to wrap to the next line */
  width: 300px; /* Adjust to match your desired container width */
   height: 450px; /* Adjust to match your desired container height */
}
}


.card {
.card-container img {
   position: relative;
   position: absolute;
   width: 300px; /* Adjust width as needed */
   top: 0;
   height: 400px; /* Adjust height as needed */
   left: 0;
  margin: 10px; /* Adjust margin between cards */
}
}


.card-frame {
.card-frame {
   width: 100%;
  z-index: 1; /* Ensures the frame is at the bottom */
   height: 100%;
   width: 95%; /* Adjust to fit the container or as needed */
   object-fit: cover; /* Ensure the frame fills the container */
   height: 95%; /* Adjust to fit the container or as needed */
  padding-left: 5%;
   padding-top: 5%;
}
 
.card-main-art {
  z-index: 2; /* Above the frame */
  width: 78%; /* Adjust based on your needs */
  padding-left: 13.5%;
  height: auto;
  transform: translateY(-4%);
}
}


.card-overlay {
 
   position: absolute;
.card-banner {
   top: 0;
   z-index: 3; /* Ensures the banner is at the top */
   left: 0;
   width: 90%; /* Adjust based on your needs */
   width: 100%;
   height: auto; /* Maintain aspect ratio */
   height: 100%;
   padding-top: 57%;
   padding-left: 7.4%;
}
}


.card-art {
.card-cost {
  width: 100%;
    z-index: 3; /* Ensures the banner is at the top */
  height: 100%;
    height: auto; /* Maintain aspect ratio */
   background-size: cover;
   }
 
.card-text-box {
position: absolute;
padding: 10px;
border-radius: 5px;
z-index: 4;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: center;
/* Add more common styles here */
}
}


.card-text {
.card-cost-text {
  position: absolute;
top: 2.65%; /* Position from the top */
  bottom: 0;
left: 6.5%; /* Position from the left */
  left: 0;
color: white;
  width: 100%;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);
  padding: 10px;
font-size: 1.5em;
  background-color: rgba(255, 255, 255, 0.8); /* Background color with transparency */
}
}


.card-text h2 {
.card-name-text {
  margin: 0;
top: 42%; /* Adjust these values based on your layout */
left: 12%;
width: 75%;
color: white;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);
 
}
}


.card-text p {
.card-description-text {
  margin: 5px 0;
left: 14%; /* Centering the box horizontally, adjust as necessary */
top: 56%;
width: 70%;
}
}

Revision as of 14:44, 3 April 2024

/* CSS placed here will be applied to all skins */
body.page-Main_Page.action-view h1.firstHeading, body.page-Main_Page.action-submit h1.firstHeading { display: none; }
body.page-Test_Main.action-view h1.firstHeading, body.page-Test_Main.action-submit h1.firstHeading { display: none; }

#p-logo { height: 250px; width: 160px; }

#p-logo a { height: 250px; width: 160px; }
div#mw-panel { padding-top: 2em; }

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px) { /* Adjust as needed */
  table, tbody, tr, td {
    display: block;
    width: 100%;
  }
}

.card-container {
  position: relative;
  width: 300px; /* Adjust to match your desired container width */
  height: 450px; /* Adjust to match your desired container height */
}

.card-container img {
  position: absolute;
  top: 0;
  left: 0;
}

.card-frame {
  z-index: 1; /* Ensures the frame is at the bottom */
  width: 95%; /* Adjust to fit the container or as needed */
  height: 95%; /* Adjust to fit the container or as needed */
  padding-left: 5%;
  padding-top: 5%;
}

.card-main-art {
  z-index: 2; /* Above the frame */
  width: 78%; /* Adjust based on your needs */
  padding-left: 13.5%;
  height: auto;
  transform: translateY(-4%);
}


.card-banner {
  z-index: 3; /* Ensures the banner is at the top */
  width: 90%; /* Adjust based on your needs */
  height: auto; /* Maintain aspect ratio */
  padding-top: 57%;
  padding-left: 7.4%;
}

.card-cost {
    z-index: 3; /* Ensures the banner is at the top */
    height: auto; /* Maintain aspect ratio */
  }
  
.card-text-box {
position: absolute;
padding: 10px;
border-radius: 5px;
z-index: 4;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: center;
/* Add more common styles here */
}

.card-cost-text {
top: 2.65%; /* Position from the top */
left: 6.5%; /* Position from the left */
color: white;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);
font-size: 1.5em;
}

.card-name-text {
top: 42%; /* Adjust these values based on your layout */
left: 12%;
width: 75%;
color: white;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);

}

.card-description-text {
left: 14%; /* Centering the box horizontally, adjust as necessary */
top: 56%;
width: 70%;
}