Site logo

Archived topic

link that gets button style

7 replies · Started by Matthew on July 24, 2019

Viewing posts 1–8 of 8

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

wow so easy. And great!

No problem :)

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

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.

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

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

This archived topic is closed to new replies.