• How do you change the button layout if you wanted the ye/no buttons “stacked” instead of side by side?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @sgoerdel,

    A bit of CSS should do that, something like:

    
    button.age-gate-submit-yes,
    button.age-gate-submit-no {
        display: block;
        margin: 0 auto 10px;
        width: 50%;
    }
    

    Thanks
    Phil

    Thread Starter sgoerdel

    (@sgoerdel)

    Yes, that gets me in the right direction, I just need to go in and correct alignment and size now.

    Thread Starter sgoerdel

    (@sgoerdel)

    https://jdemo15staging.wpengine.com/

    This is what is happening now. Changing the padding on the individual buttons appears to not alter the size and the second button looks slightly in from the second. Yhe idea is to have the buttons in the middle and not quite as wide.

    .age-gate-submit-yes,.age-gate-submit-no{
        display: block;
        margin: 0 auto 0;
        align-items: center;
        width: 50%;
        
    }
    .age-gate-submit-yes {
        color: white;
        background-color: black;
        padding: 10px 6px;
        font-size: 16px;
        
    	margin: 0 5px 10px 0
    }
    .age-gate-submit-no {
        color: black;
        background-color: white;
        padding: 10px 6px;
        font-size: 16px;
    	margin: 0 5px 10px 0
    }
    Plugin Author Phil

    (@philsbury)

    Hi @sgoerdel,

    The buttons use the border-box model, so padding won’t alter their width as that’s coming from the 50% you have set.

    I’d change:

    width: 50%; to width: 30%; or whatever you want it to be.

    The spacing is from the margin you have, you need left and right to be auto, so change the two margin: 0 5px 10px 0 to margin: 0 auto 10px; and is should be all good.

    Thanks
    Phil

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change Yes/No layout’ is closed to new replies.