Jump to content

Custom CSS gallery caption text size affecting gallery formatting

Recommended Posts

Posted (edited)

Hi there, I've added some custom CSS to Simple Gallery on my company website: 

// distillers team images //

.gallery-caption-grid-simple p:first-line {
        font-weight: 700 !important;
        font-size: 1.5rem !important;
          margin-bottom: 12px !important;
}
.gallery-caption-grid-simple p {
    text-align: center !important;
    font-weight: 300 !important;
    font-size: 1rem !important;
      line-height: 1.6rem !important;
    white-space:pre
}

Now I'm having two problems:

I seem to have increased the size of the images, and as a result, the gallery is wider than the page. I need to scroll sideways to see the full grid which is not ideal. This is especially noticeable on mobile.

Is there a way to increase the size of the first line of each caption as I have done above, but without affecting the width of the gallery?

squarespace-gallery-mobile.jpeg

Edited by geoffkhli
I wasn't finished writing my post
  • Replies 3
  • Views 932
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
Posted

Use this CSS code

.gallery-caption-grid-simple p::first-line {
    font-size: 50px !important;
    font-weight: bold !important;
}
@media screen and (min-width:768px) {
.gallery-grid-wrapper {
    width: 100% !important;
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
}}

image.thumb.png.c230285f12ed5dfeb629ad94c05999a2.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

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


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.