How to make button look like a link?


Tags: css,button,hyperlink

Problem :

I need to make a button look like a link using CSS. The changes are done but when i click on it, it shows as if its pushed as in a button. Any idea how to remove that so that the button works as a link even when clicked?



Solution :

HTML

<button>your button that looks like a link</button>

CSS

button {
     background:none!important;
     border:none; 
     padding:0!important;
     font: inherit;
     /*border is optional*/
     border-bottom:1px solid #444; 
     cursor: pointer;
}

See Demo (on JSfiddle)


    CSS Howto..

    how to scroll text area horizontally?

    How to choose font different font-weight? use bolder one or just font-weight?

    How to write multiple css selectors in one line?

    How to apply an active state to a CSS sprite?

    How to keep indent in lists with CSS?

    How to make the page load scrolled down to
    when loaded?

    Responsive layout, how to keep text at bottom of dynamically resizing image

    How does css position impact element width/height?

    How to make a div fill the remaning vertical space using css

    How to make a close button for each image inside the div using CSS and js

    How to change Image inside of CSS of a usercontrol

    Primefaces: how to change the default icon on the button of the calendar field?

    bootstrap collapse to show a div it work but how to make it didn't affect side items?

    How to keep background image on css gradient

    Facebook Like Button - how to disable Comment pop up box?

    How to wrap entire line with overline and underline , until the end of the line ?

    How does the Meebo bar work so well cross-browser?

    How to make a unique line thinner using NVD3

    How to write css rule with variable to change font-size?

    How to style nested element that is styled by its parent already

    How do I make an image resize inside a div that is resizing to a percentage of a parent div?

    How to add background-size in css based on image size?

    How to put CSS and HTML in one page of code? [duplicate]

    How to access an element's class value via CSS

    How to get Style From jQuery in angular2

    Picture thumbnail shown in Google image search output is
    not , why? [closed]
    It basically comes down to preference. It is considered outdated to use table for data layouts. Use table for just that - actual tables. For the layout and such tasks,...
    Read more

    how to position these CSS elements without defining height and width

    How to make 1 table scrollable with fixed header without affecting other tables in Bootstrap

    How do i rotate text in css

    How to remove the particular CSS style (set through CSS file) from an HTML list