Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How do I center the content in a cropped code block


adamcutts

Question

Hi,

I have used a code block to contain an image and have created some code to allow this code block to crop relative to the page dimensions. I am however unsure how to keep the content centered vertically rather than cropping from the top.

Here is an example of my current css

.sqs-block { 
  padding: -0 !important;
  margin-top: -0px;
  margin-bottom: -0px;
  object-fit: cover;
  max-height: 50vh;
}

Many thanks

Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...