Template:ButtonBox/styles.css: Difference between revisions
Appearance
No edit summary |
Adds ellipsis |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
border-spacing: 1em; | border-spacing: 1em; | ||
border-collapse: separate; | border-collapse: separate; | ||
display: flex; | |||
flex-wrap: wrap; /* if you want them to wrap */ | |||
justify-content: flex-start; | |||
align-items: flex-start; | |||
} | } | ||
/* Each individual entry box */ | /* Each individual entry box */ | ||
.buttonbox-entry { | .buttonbox-entry { | ||
width: | width: 100px; | ||
padding: 0.5em; | padding: 0.5em; | ||
border: 1px solid #ccc; | border: 1px solid #ccc; | ||
| Line 26: | Line 30: | ||
/* Label under the image */ | /* Label under the image */ | ||
.buttonbox-label { | .buttonbox-label { | ||
font-size: 0. | font-size: 0.8em; | ||
font-weight: bold; | font-weight: bold; | ||
color: #333; | color: #333; | ||
white-space: nowrap; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
} | } | ||
| Line 39: | Line 47: | ||
.buttonbox-label { | .buttonbox-label { | ||
margin-top: 0.3em; | margin-top: 0.3em; | ||
font-size: 0. | font-size: 0.8em; | ||
word-wrap: break-word; | word-wrap: break-word; | ||
} | } | ||
Latest revision as of 21:16, 11 November 2025
.buttonbox {
margin: 1em auto;
border-spacing: 1em;
border-collapse: separate;
display: flex;
flex-wrap: wrap; /* if you want them to wrap */
justify-content: flex-start;
align-items: flex-start;
}
/* Each individual entry box */
.buttonbox-entry {
width: 100px;
padding: 0.5em;
border: 1px solid #ccc;
background: #fff;
text-align: center;
/* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
/* Image inside the entry */
.buttonbox-entry img {
width: 70px;
height: 70px;
object-fit: cover;
margin-bottom: 0.3em;
}
/* Label under the image */
.buttonbox-label {
font-size: 0.8em;
font-weight: bold;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Hover effect for interactivity */
.buttonbox-entry:hover {
background-color: #e0e0e0;
cursor: pointer;
}
.buttonbox-label {
margin-top: 0.3em;
font-size: 0.8em;
word-wrap: break-word;
}