Okay
  Public Ticket #3736074
Button auto-hover
Closed

Comments

  • preston20 started the conversation

    I have a button ("get to healing") that is full width thanks to some custom CSS. However, I would like the button to have the arrow already appearing like it's hovering. That way visitors can clearly see it's a button. 

    Attached files:  Screenshot 2024-10-01 at 11.30.07 AM.png

  •  8,938
    Tahir replied

    Hey preston20 ,

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    .button-stretch.nectar-button.has-icon i {
        opacity: 1;
        -ms-filter: "alpha(opacity=100)";
        transform: translateX(6px);
    }
    

    Thanks


    ThemeNectar Support Team 

  • preston20 replied

    Thank you! I have one more question: how can I add more padding to the right of the arrow? I tried messing with the custom CSS for the stretched button and i couldn't get it to work. 

  •  1,918
    Judith replied

    Hello Preston,

    Thanks for writing back.

    To make the changes as requested, you will need to add some custom CSS code. To do this, please follow these steps:

    From your WordPress dashboard, Navigate to Salient > General Settings > CSS/Script Related. In the custom code area, insert the provided CSS snippet:

    .nectar-button i.icon-button-arrow {
        left: 15em;
    }

    Once the code is added, save and refresh the page to see if the change has been applied. In case it helps, please check this section from the documentation on CSS/Script Related. If this does not work as expected or If you have any further questions or need additional assistance, don't hesitate to write back, I'm happy to help. 

     

  • preston20 replied

    Judith, that worked great. I decided to add another button underneath (the one that's transparent and then solid on hover) and was able to edit the CSS to have it auto-hover and fix the arrow padding. However, I can't get the arrow to be the blue color. I'm using this CSS code:


    /*  SEE THROUGH BUTTON STRETCH ACROSS ROW */

    .nectar-button.jumbo.see-through-2.button-stretch-2 {

        width: 100%;

        padding-top: 40px !important;

        padding-bottom: 40px !important;

        padding-left: 60px !important;

        padding-right: 60px !important;

        font-size: 20px!important;

        

    }

    /*  SEE THROUGH BUTTON AUTO HOVER */

    .button-stretch-2.nectar-button.has-icon i {

        opacity: 1;

        -ms-filter: "alpha(opacity=100)";

        transform: translateX(6px);

    }

    /*  SEE THROUGH BUTTON ARROW PADDING AND COLOR */

    .button-stretch-2.nectar-button.has-icon i.icon-button-arrow {

        padding-right: 35px;

        color: #3333ff;

    }


  •  1,918
    Judith replied

    Hi Preston,

    Thanks for writing back.

    To make the changes as requested, you will need to add some custom CSS code. To do this, please follow these steps:

    From your WordPress dashboard, Navigate to Salient > General Settings > CSS/Script Related. In the custom code area, insert the provided CSS snippet:

    .button-stretch-2.nectar-button.has-icon i.icon-button-arrow {
        color: #3333ff !important;
    }

    Once the code is added, save and refresh the page to see if the change has been applied. In case it helps, please check this section from the documentation on CSS/Script Related. If this does not work as expected or If you have any further questions or need additional assistance, don't hesitate to write back, I'm happy to help. 

     

  • preston20 replied

    That worked, but now when you go to hover, the arrow disappears into the blue background. Can you write some code for me for the arrow to change to while on hover?

  •  8,938
    Tahir replied

    Hey Again,

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    .button-stretch-2.nectar-button.has-icon:hover i.icon-button-arrow {
        color: #fff !important;
    }
    

    Thanks

    Thanks.


    ThemeNectar Support Team 

  • preston20 replied

    Works perfectly! Thanks, Tahir!

  •  1,918
    Judith replied

    Hello Preston,

    I'm happy that we could assist you! If you haven't already, please consider sharing your experience by leaving a review on ThemeForest.

    If you've enjoyed Salient, be sure to check out Nectarblocks, our latest innovation for building websites visually with WordPress.

    Your feedback is valuable to us and greatly appreciated!

    Should you have any further questions or encounter any difficulties along the way, please don't hesitate to reach out. 

    Best regards,