Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #448525

    Hello,

    I’m hoping this is doable, but not sure:

    I’d like to have a Button with the text “Call Us” set up so that when you either click the button or mouse hover over it, the text changes to a phone number.

    I don’t want to navigate to a new page just to show the number. I just want it to appear either from a mouse hover over the button or a click of the button on the same page.

    Is there a way to do this?

    Thanks so much

    #448578

    Hi!

    Defiantly possible, you can do something like this (button has custom class of “call_us”):

    .call_us .avia_iconbox_title {
        font-size: inherit;
    
    }
    .call_us .avia_iconbox_title:after{
        content: "303023023";
        font-size: 0;
    
    }
    .call_us:hover .avia_iconbox_title {
        font-size: 0;
    
    }
    .call_us:hover .avia_iconbox_title:after{
        font-size: 14px;
    }

    Regards,
    Josue

    #448746

    Hi again,

    Thanks for the quick reply.

    I copied and pasted the code with no luck. Unfortunately, I have no coding experience.

    Sorry to be basic, but can you explain what a “custom class” is?
    The button in question reads “Call us” (not “call_us”).

    Any further assistance would be greatly appreciated.

    Thanks

    #448749

    Oh sorry, you need to enable this first:
    http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    Then in the button in question set the class of call_us:

    Cheers!
    Josue

    #448756

    Yes! Thanks!

    #448759

    You are welcome, glad to help :)

    Regards,
    Josue

    #448812

    Just a quick follow up:

    1) When I hover, the width of the button changes (it gets wider); how can I make the width static? (it’s X large);

    2) When I hover, the button changes shade slightly. I don’t want it to change colors on the hover. How can I turn this off?

    Thanks!

    #448815

    Hey!

    Try this:

    .call_us{
       min-width: 250px;
    }
    .call_us:hover{
       opacity: 1;
    }

    If it doesn’t work please post a link to your site.

    Cheers!
    Josue

    #448819

    That didn’t work, and I’m running the site on MAMP.

    Have you any other ideas?

    Thanks

    #448820

    This should do it:

    .call_us .avia-button {
       min-width: 150px;
    }
    .call_us:hover .avia-button {
       opacity: 1;
    }
    #448821

    That fixed the color issue, thanks. But the sizing is still off.

    What’s the normal width in px for X-large buttons? Would this work:

    .call_us .avia-button {
    max-width: XXXpx;
    }

    #448822

    the issue is that the button gets larger when I hover over it. I just want it to stay the same size, e.g., the typical X-large size.
    Thanks

    #448825

    Play with the value, maybe 350px:

    .call_us .avia-button {
       min-width: 350px;
    }

    Regards,
    Josue

    #448826

    I don’t think that’s the right code.

    When I hover, the box gets larger, not smaller. So setting the minimum width value doesn’t solve the problem.

    I tried substituting “max-width” for “min-width” and got the button to stop getting wider upon hovering, but now it gets TALLER upon hovering instead. I have no idea why. Weird.

    Any ideas?

    #448828

    It’s really hard to debug this kind of issue without seeing the actual page, leave this for now and let me know through this topic when you upload the site.

    Best regards,
    Josue

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.