Can you set a part of a grid card entry to be at the bottom? #6855
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hello @Andre601, https://squidfunk.github.io/mkdocs-material/customization/#additional-css firefox_euOVCGuuti.mp4.md-typeset .grid.cards > ul > li {
display: flex;
flex-direction: column;
outline: 1px solid green;
}
.grid.cards li p:last-child {
display: flex;
flex-grow: 5; /* Probably 2 would be enough, as the grids shouldn't hold too much text to begin with, but to be safe I set it to 5 */
outline: 1px solid red;
}
.grid.cards li p:last-child a {
align-self: flex-end;
} There is a slight increase in the gap around the |
Beta Was this translation helpful? Give feedback.
-
I'm back with another situation similar to the one I had before. The difference here is, that instead of a single link, I want to have an unordered list be put at the bottom of a flex entry. Here is the markdown: <!-- "hide-list" is used in CSS to hide the dots of nested unordered lists -->
<div class="grid cards hide-list" markdown>
- ## Example 1
Lorem Ipsum dolor.
- [Another page](https://example.com/another-page)
- [More](https://example.com)
- ## Example 2
- [Link](https://link.example.com)
</div> Using this with the following CSS: .md-typeset .grid.cards.hide-list > ul > li > ul > li {
list-style-type: none;
}
.md-typeset .grid.cards.hide-list > ul > li {
display: flex;
flex-direction: column;
}
.md-typeset .grid.cards.hide-list > ul > li > ul {
flex-grow: 2;
display: flex;
}
.md-typeset .grid.cards.hide-list > ul > li > ul > li {
align-self: flex-end;
} I tried to do different variations here (Applying attributes flex-grow, display and align-self to different parts) but no real luck here... What would I need to modify to get a similar outcome to the other situation? |
Beta Was this translation helpful? Give feedback.
Hello @Andre601,
I'm no CSS expert, but I played a bit with display flex and managed to find a "solution" to your query:
https://squidfunk.github.io/mkdocs-material/customization/#additional-css
firefox_euOVCGuuti.mp4
There is a slight increase in the gap around the
<hr>
line at the top, and I don't think I …