User:Sur/vector.css: Difference between revisions
< User:Sur
Tag: Undo |
m you know the drill |
||
Line 1: | Line 1: | ||
.stat-infobox { | .stat-infobox { | ||
width: 175px; /* Wider by default */ | width: 175px; /* Wider by default */ | ||
background-color: #f0f0f0; | background-color: #f0f0f0; | ||
border-radius: 10px; | border-radius: 10px; | ||
text-align: center; | text-align: center; | ||
position: relative; | position: relative; | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
Line 14: | Line 11: | ||
transition: width 0.3s ease; | transition: width 0.3s ease; | ||
margin-bottom: 10px; /* Add space below to prevent overlap */ | margin-bottom: 10px; /* Add space below to prevent overlap */ | ||
/* Remove fixed height to allow dynamic adjustment */ | |||
min-height: 150px; /* Minimum height to prevent collapsing */ | |||
} | } | ||
.stat-infobox:hover { | .stat-infobox:hover { | ||
width: 175px; /* Width remains the same on hover */ | width: 175px; /* Width remains the same on hover */ | ||
/* Expand based on content height */ | |||
} | } | ||
.stat-infobox-hover { | .stat-infobox-hover { | ||
display: block; /* Table is | display: block; /* Table is always visible */ | ||
position: absolute; | position: absolute; | ||
top: 0; | top: 0; | ||
Line 58: | Line 33: | ||
transform: translateX(0); | transform: translateX(0); | ||
transition: opacity 0.3s ease, transform 0.3s ease; | transition: opacity 0.3s ease, transform 0.3s ease; | ||
height: auto; /* Allow the height to auto-adjust based on content */ | |||
} | |||
.stat-infobox-content { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
border-radius: 15px; | |||
height: auto; /* Adjust height dynamically */ | |||
width: 100%; | |||
} | } | ||
Line 63: | Line 49: | ||
width: 100%; | width: 100%; | ||
border-collapse: separate; | border-collapse: separate; | ||
margin-top: 10px; /* Add space above to prevent overlap | margin-top: 10px; /* Add space above to prevent overlap */ | ||
} | } | ||
Line 78: | Line 64: | ||
max-width: 320px; | max-width: 320px; | ||
font-family: 'Retail Demo', sans-serif; | font-family: 'Retail Demo', sans-serif; | ||
} | } |
Revision as of 18:27, 22 September 2024
.stat-infobox {
width: 175px; /* Wider by default */
background-color: #f0f0f0;
border-radius: 10px;
text-align: center;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: width 0.3s ease;
margin-bottom: 10px; /* Add space below to prevent overlap */
/* Remove fixed height to allow dynamic adjustment */
min-height: 150px; /* Minimum height to prevent collapsing */
}
.stat-infobox:hover {
width: 175px; /* Width remains the same on hover */
/* Expand based on content height */
}
.stat-infobox-hover {
display: block; /* Table is always visible */
position: absolute;
top: 0;
left: 175px; /* Keep this fixed to prevent horizontal shifts */
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
padding: 10px;
border-radius: 15px;
opacity: 1;
transform: translateX(0);
transition: opacity 0.3s ease, transform 0.3s ease;
height: auto; /* Allow the height to auto-adjust based on content */
}
.stat-infobox-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 15px;
height: auto; /* Adjust height dynamically */
width: 100%;
}
.stat-infobox-table {
width: 100%;
border-collapse: separate;
margin-top: 10px; /* Add space above to prevent overlap */
}
.stat-infobox-table th,
.stat-infobox-table td {
padding: 5px;
text-align: center;
background-color: rgba(0, 0, 0, 0.08);
border: 1px solid black;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: relative;
max-width: 320px;
font-family: 'Retail Demo', sans-serif;
}