[Resolved] link that gets button style

Home Forums Support [Resolved] link that gets button style

Home Forums Support link that gets button style

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #966481
    Matthew

    How can I have a link that looks exactly like a button. Is there some sort of inherit class that gets all the styles

    There’s numerous areas in the style sheet where button appears so not quite sure

    #966489
    Leo
    Staff
    Customer Support

    Hi there,

    This should help:
    https://docs.generatepress.com/article/adding-buttons/

    Let me know ๐Ÿ™‚

    #967487
    Matthew

    wow so easy. And great!

    #967488
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

    #985452
    Matthew

    How about the reverse.

    A button that looks like a link. That’s understated and goes into a sentence

    It will do a button-like duty (instead of linking to a page)

    Or alternatively is there a cool button style that already exists for this

    #985552
    David
    Staff
    Customer Support

    Hi there,

    Does a simple <a href="url">A basic link</a> link not fulfil the purpose? Or do you need it to trigger another event such as a pop up or something – let us know.

    #985563
    Matthew

    hi David!

    I’m preparing a document for a programmer so I can’t say exactly what will run.

    It will be a Fontawesome cross icon with ‘Delete’ text which when clicked will remove a product item from a summary page. Like a cart page but it’s for a quote system. So the user will stay on the page after the product text etc disappears.

    I thought that links should only be used for an actual link to another page?

    thanks

    #985581
    David
    Staff
    Customer Support

    You can add FA icons to a link ( whether it be styled like a button or not ) by including their HTML within the tag eg. using FA 4 X (times) icon:

    <a href="url"><i class="fa fa-times-circle" aria-hidden="true"></i> Delete</a>

    The class="button" that is added to the <a> tag in the article Leo provide is what styles the link to look like a button.

    Although the different needs for a <a> link or <button> has somewhat degraded over the years, as you’re describing a UI element then the HTML <button> would probably be more appropriate:

    https://www.w3schools.com/tags/tag_button.asp

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