[Resolved] Ghost Button CSS and Class

Home Forums Support [Resolved] Ghost Button CSS and Class

Home Forums Support Ghost Button CSS and Class

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1327304
    Angus

    Hi I’m trying to add a ‘ghost button’ to one specific button only. I’ve tried adding the following to Additional CSS

    .button.ghost {
        background-color: transparent;
        border: 1px solid #FFF;
        color: #222222;
    }
    
    .button.ghost:hover {
        background-color: #FFFFFF;
    }

    and tried giving the button the class button.ghost but no luck. I think the main CSS is overriding anything I add. I’ve also tried using .gb-button-ddcecbe5 as a class but that doesn’t work either. It’s the Get Directions button over the map image on the page.

    Any assistance would be greatly appreciated…
    Thanks

    #1327906
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    To use that CSS, your HTML would look like this:

    <a class="button ghost" href="#">My Button</a>

    Let me know if that helps or not πŸ™‚

    #1329189
    Angus

    I’m using blocks, and when I edit as html I get ‘This block contains unexpected or invalid content’. Although if I ignore that and update, the button does what it should, but the warning persists.

    #1329570
    David
    Staff
    Customer Support

    Hi there,

    why not just use a Buttons block ? Use the GenerateBlocks one and you can style it exactly how you want from the editor.

    #1329899
    Angus

    Hi David, the button was a GB button originally, that’s what I was having difficulty with, it adhering to the css class I gave it. But after Tom gave me the html I changed it to a html block. It seems to be working, although the positioning isn’t perfect, but I’d prefer to use a GB button.

    #1329924
    David
    Staff
    Customer Support

    Have you tried creating a new GB Button without adding any CSS classes to it?
    You should be able to style that using the Buttons settings

    #1330368
    Angus

    Style it into a ghost button?

    #1330625
    Tom
    Lead Developer
    Lead Developer

    Yea – you can just style it to have a border and no background color – that way it will be a ghost-style button with no extra CSS/HTML πŸ™‚

    #1330883
    Angus

    OK thanks guys, I’ll try that πŸ‘

    #1331588
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

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