css - Making a <button> that's a link in HTML -
basically, way <input type="submit">
styled, clickable button when add little css. however, regular buttons not styled such, have no such clickability without major css or js, , have use images.
i made submit buttons links, using form action, requires me make new form each button. how can find happy medium? using multiple forms causing problems in styling can't seem fix unless find way make buttons links in html, have default style makes them have pressed state (and don't mean browser default settings).
any ideas?
<a href="#"><button>link text</button></a>
you asked link looks button, use link , button :-) preserve default browser button styling. button nothing, clicking activates parent link.
demo:
<a href="http://stackoverflow.com"><button>link text</button></a>
Comments
Post a Comment