[Resolved] How do I add full width button with centered text and inherits Theme color

Home Forums Support [Resolved] How do I add full width button with centered text and inherits Theme color

Home Forums Support How do I add full width button with centered text and inherits Theme color

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1377679
    Hemant

    Is there a way I can add full width button that inherits theme color but with bold and large text?

    I wish to add a button that says continue with a hyperlink to other page.

    The page in question is: https://pressbuzzer.com/celebrities-who-died-too-soon/3

    There already exists a continue button but I would like to achieve it through themes color… I want the text size to be large and centered…

    #1377723
    David
    Staff
    Customer Support
    #1377866
    Hemant

    Thanks David, So I have this CSS:

    .button.sun-flower,
    .button.sun-flower:visited {
    	background: #F1C40F;
    	color:#FFF;
    }
    
    .button.large {
    	font-size: 35px;
    }
    
    a.button.wide {
        width: 100%;
    }

    And this is the HTML Code:

    <a class="button sun-flower large wide" href="URL FOR YOUR BUTTON">Your button text</a>

    It works well.. but how to I center the text?

    #1377873
    Hemant

    I managed to get it work via this..

    <center><a class="button sun-flower large wide" href="URL FOR YOUR BUTTON">Your button text</a></center>

    but the button is slightly tilted towards right… how do i make it center… check it on mobile..

    link: https://pressbuzzer.com/test/

    #1377916
    David
    Staff
    Customer Support

    Change this CSS:

    a.button.wide {
        width: 100%;
    }

    to:

    a.button.wide {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    #1377935
    Hemant

    You are a genius.. that worked.. 🙂

    #1377940
    David
    Staff
    Customer Support

    You’re welcome

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