Jump to content

changing the size of the hover box for a particular section

Recommended Posts

Site URL: https://peoplefirst1.squarespace.com

Hi, i've used the following code ( from heart and dash's code) to change the background colour and text colour and it works, but i'm unable to figure out how to change the box size. I want the box to cover the entire image only for one particular section. 

Thank  you.

#page-section-610bebb9de02d80e5889b075
.image-caption p {
 font-size: 18px !important;
 font-weight: semibold !important;
 color: #ffffff !important;
 text-transform: uppercase; 
 line-height: 120% !important;
 letter-spacing: 2px !important;
 opacity: 1 !important;
}

#page-section-610bebb9de02d80e5889b075
.image-caption-wrapper {
  background: #0059b3 !important;
  opacity: 1 !important;
}

 

2146791142_Screenshot2021-09-06at5_01_27PM.thumb.png.2219f3fd29821cb52ea7c7544b7722c5.png

Link to comment
  • Replies 6
  • Views 660
  • Created
  • Last Reply

Top Posters In This Topic

On 9/9/2021 at 10:24 AM, Namrata said:

Hi. Use this code

#page-section-610bebb9de02d80e5889b075 .image-caption-wrapper {
    max-height: unset !important;
    height: 100% !important;
}

 

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!)

Link to comment

Great! it works. Thanks a ton. 

 How can i make the text centre aligned and to the middle? Right now it's left aligned. When there is a lot of text it looks fine, but when the text is just a one liner there is too much space.

Below is the full code.

#page-section-610bebb9de02d80e5889b075
.image-caption p {
 font-size: 18px !important;
 font-weight: semibold !important;
 color: #ffffff !important;
 text-transform: uppercase; 
 line-height: 120% !important;
 letter-spacing: 2px !important;
 opacity: 1 !important;
}

#page-section-610bebb9de02d80e5889b075
.image-caption-wrapper {
  background: #0059b3 !important;
  opacity: 1 !important;
   max-height: unset !important;
   height: 100% !important;
}

Screenshot 2021-09-12 at 10.59.11 AM.png

Link to comment

use this

#page-section-610bebb9de02d80e5889b075 .image-caption p {
    font-size: 18px !important;
    color: #fff !important;
    text-transform: uppercase;
    line-height: 120% !important;
    letter-spacing: 2px !important;
    opacity: 1 !important;
    text-align: center;
}

also, font-weight: semibold doesn't exist, so I removed from the code

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!)

Link to comment

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.