Skip to content

Adjusting image size/layout on a grid TOC page #735

Answered by geealbers
zsofiaj asked this question in Get Help
Discussion options

You must be logged in to vote

In your custom.css file, you can set a fixed height for those images and then use "object-fit: contain;" which will scale each image to fill as much of the box as possible while still maintaining its aspect ratio:

.quire-contents-list.grid .image img {
  height: 200px;
  object-fit: contain;
}

In think you'll then also want to remove the box shadow that appears on hover, as it will no longer fit the image borders properly and will look a little odd:

.quire-contents-list.grid ol li .card .card-image .image:hover {
  box-shadow: none;
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zsofiaj
Comment options

@geealbers
Comment options

Answer selected by geealbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants