Jump to content

Need help adding left and right arrows to a button

Go to solution Solved by creedon,

Recommended Posts

Hello all! I'm trying to add two buttons at the bottom of the page signifying going onto the next or back to another case study in a portfolio. I found the CSS for the right arrow and it currently looks like Bakery Redesign pic with this code: 

.sqs-block-button-element:after {
    content: '➔';
    color: #00000 !important;
    padding-left: 30px;
    margin:10px 10px 10px 10px;
}

But I also need another button that looks the same but with the left arrow(EatUnbound). Anyone have any idea how? Also the css applies to all the buttons I put onto the site now, is there a way to only affect these buttons?

 

Thanks!

Screenshot 2023-07-21 at 3.24.36 PM.png

Screenshot 2023-07-21 at 3.26.05 PM.png

Edited by brendaweicai
adding site url
Link to comment

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Because you are using button blocks and not some collection type that provides it's own back/forward navigation elements (not that there is one that would fit your needs), there is no way from the button block code to know which one is which.

The only CSS way to overcome this is to specify each button id so the CSS knows where to place the arrows.

/* next buttons */

#block-yui_3_17_2_1_1689892764837_8954 .sqs-block-button-element::after,
#block-yui_3_17_2_1_1689952372864_12393 .sqs-block-button-element::after

  {

    content : '\2192';
    font-size : x-large;
    margin-left : 0.25em;
    
    }

/* previous buttons */

#block-bef4acd0c7addcb87c6d .sqs-block-button-element::before

  {

    content : '\2190';
    font-size : x-large;
    margin-right : 0.25em;
    
    }

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • Solution

Here is a LESS version of the code that can save some amount of repetitive typing.

// begin button block next/previous arrows, uses LESS syntax

  // next buttons
  
  #block-yui_3_17_2_1_1689892764837_8954,
  #block-yui_3_17_2_1_1689952372864_12393
  
    {
    
      .sqs-block-button-element::after {
      
        content : '\2192';
        font-size : x-large;
        margin-left : 0.25em;
        
        }
        
      }
      
  // previous buttons
  
  #block-bef4acd0c7addcb87c6d {
  
    .sqs-block-button-element::before {
    
      content : '\2190';
      font-size : x-large;
      margin-right : 0.25em;
      
      }
      
    }
    
  // end button block next/previous arrows, uses LESS syntax

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks so much! It worked perfectly and I learned some new CSS! 

23 hours ago, creedon said:

Here is a LESS version of the code that can save some amount of repetitive typing.

// begin button block next/previous arrows, uses LESS syntax

  // next buttons
  
  #block-yui_3_17_2_1_1689892764837_8954,
  #block-yui_3_17_2_1_1689952372864_12393
  
    {
    
      .sqs-block-button-element::after {
      
        content : '\2192';
        font-size : x-large;
        margin-left : 0.25em;
        
        }
        
      }
      
  // previous buttons
  
  #block-bef4acd0c7addcb87c6d {
  
    .sqs-block-button-element::before {
    
      content : '\2190';
      font-size : x-large;
      margin-right : 0.25em;
      
      }
      
    }
    
  // end button block next/previous arrows, uses LESS syntax

 

 

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.