Skip to content

Can you set a part of a grid card entry to be at the bottom? #6855

Answered by kamilkrzyskow
Andre601 asked this question in Q&A
Discussion options

You must be logged in to vote

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
.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 <hr> line at the top, and I don't think I …

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@Andre601
Comment options

Answer selected by Andre601
Comment options

You must be logged in to vote
6 replies
@Andre601
Comment options

@Andre601
Comment options

@Andre601
Comment options

@kamilkrzyskow
Comment options

@Andre601
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants