Jump to content

Button over gallery image in 7.1 / Brine

Recommended Posts

Site URL: https://www.amgsnacks.com/test

Hi there,

Looking for help trouble shooting a button over a gallery image in the Brine Template. I used the following code to convert my URL into a button and am running into two errors:

  • The button is not centered under the text
  • When I preview the page outside the CSS editor none of the changes are shown

I used the following CSS:

#all-natural-snacks .Index-gallery-wrapper .Index-gallery-item p:last-child {
     background-color: #black;
      border: 2px solid #ffff;
    max-width: 200px;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 0px;
}

Attached a screengrab for reference. Thank you in advance!

Screen Shot 2021-01-12 at 8.43.46 AM.png

Link to comment
  • Replies 5
  • Views 324
  • Created
  • Last Reply

Use this new code

section#all-natural-snacks p a {
    background: black;
    border: 2px solid #ffff;
    max-width: 200px;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 0px;
}
section#all-natural-snacks p {
    text-align: center;
    margin: 0 auto;
}

 

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

SO helpful— thank you. I am running into two issues with the new CSS I am hoping you can help me with.

 

  1. How can I control the padding between the button and the headline?
  2. When I refresh the page, the button outline seems to disappear— only showing up when I am in the CSS. You'll see this if you visit: https://www.amgsnacks.com/test


Thank you!

Screen Shot 2021-01-15 at 5.16.17 PM.png

Screen Shot 2021-01-15 at 5.16.29 PM.png

Link to comment
On 1/16/2021 at 5:18 AM, amgsnacks said:

SO helpful— thank you. I am running into two issues with the new CSS I am hoping you can help me with.

 

  1. How can I control the padding between the button and the headline?
  2. When I refresh the page, the button outline seems to disappear— only showing up when I am in the CSS. You'll see this if you visit: https://www.amgsnacks.com/test


Thank you!

Screen Shot 2021-01-15 at 5.16.17 PM.png

Screen Shot 2021-01-15 at 5.16.29 PM.png

Add new code

#all-natural-snacks p a {
    background: #000;
    border: 2px solid #fff;
    max-width: 200px;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 0px;
    margin-top: 20px !important;
    display: inline-block;
}

 

 

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
  • 3 weeks later...

This has been so helpful... I was able to alter the style of the button but now I am wondering how to make it look more functional in mobile. 


Do you have any advice on what I can alter? Perhaps so the text doesn't hyphenate and so there's padding at the bottom and we can see the full button?

Screen Shot 2021-02-02 at 10.25.48 AM.png

Link to comment
On 2/2/2021 at 10:27 PM, amgsnacks said:

This has been so helpful... I was able to alter the style of the button but now I am wondering how to make it look more functional in mobile. 


Do you have any advice on what I can alter? Perhaps so the text doesn't hyphenate and so there's padding at the bottom and we can see the full button?

Screen Shot 2021-02-02 at 10.25.48 AM.png

Add to Design > Custom CSS

@media screen and (max-width:640px) {
section#all-natural-snacks h2 {
    font-size: 26px;
}
}

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.