You could use input type image.
<input type="image" src="http://example.com/path/to/image.png" />
It works as a button and can have the event handlers attached to it.
Alternatively, you can use css to style your button with a background image, and set the borders, margins and the like appropriately.
<button style="background: url(myimage.png)" ... />
Related Posts:
- CSS: Moving the text down a few pixels but keeping the background still?
- CSS: Moving the text down a few pixels but keeping the background still?
- Is element block level or inline level?
- How do I auto-resize an image to fit a ‘div’ container?
- CSS Display an Image Resized and Cropped
- How to place a text next to the picture?
- Bootstrap 4 images thumbnail classes
- CSS Background image not loading
- How to “crop” a rectangular image into a square with CSS?
- CSS centred header image
- what’s the easiest way to put space between 2 side-by-side buttons in asp.net
- Why would max-width not work on this?
- Is it possible to set the equivalent of a src attribute of an img tag in CSS?
- How to add image that is on my computer to a site in css or html?
- Making an image act like a button
- How to make a monopoly board using css grid?
- How to horizontally center an element
- Making a
- How to create an HTML button that acts like a link
- How to set a border for an HTML div tag
- Setting table column width
- What is difference between png8 and png24
- How to center an iframe horizontally?
- Creating a nav bar with flexbox
- forbidden 403 on image URLS
- How to line-break from css, without using
? - How to put img inline with text
- How to center a “position: absolute” element
- How do I make an image smaller with CSS?
- What is sr-only in Bootstrap 3?
- How to put a text beside the image?
- How to change text transparency in HTML/CSS?
- AngularJS ngClass conditional
- How to darken a background using CSS?
- Placing border inside of div and not on its edge
- Hiding a button in Javascript
- How to apply CSS to iframe?
- How to display and hide a div with CSS?
- Draw a line in a div
- Change Color of Fonts in DIV (CSS)
- Why is “cursor:pointer” effect in CSS not working
- How to move text up using CSS when nothing is working
- How to style input and submit button with CSS?
- How to display image with JavaScript?
- a href link for entire div in HTML/CSS
- How do I set vertical space between list items?
- Check if an element contains a class in JavaScript?
- How to outline text in HTML / CSS
- Complete list of reasons why a css file might not be working
- Brackets – Live Preview not working
- HTML iframe – disable scroll
- CSS set li indent
- Why does this CSS margin-top style not work?
- How to center content in a Bootstrap column?
- Freeze the top row for an html table only (Fixed Table Header Scrolling)
- HTML list-style-type dash
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery
- How do I install a custom font on an HTML site
- How can I center a div within another div?
- How to align content of a div to the bottom
- How can I make my footer center to the bottom of the page?
- How to align an input tag to the center without specifying the width?
- Remove scrollbar from iframe
- How can I embed video for discord directly from website?
- Basic CSS – how to overlay a DIV with semi-transparent DIV on top
- difference between width auto and width 100 percent
- Making text background transparent but not text itself
- How to show text on image when hovering?
- Square brackets in CSS
- How do I disable form fields using CSS?
- Fit background image to div
- body background color not showing?
- Table scroll with HTML and CSS
- Set cellpadding and cellspacing in CSS?
- How to make a div 100% height of the browser window
- How to make my website fit any screen size?
- Display:inline not working
- CSS content property: is it possible to insert HTML instead of Text?
- How to increase height of textarea using bootstrap rows and columns
- Indent List in HTML and CSS
- Bootstrap 3 Glyphicons CDN
- Absolute position is not working
- Position absolute but relative to parent
- How do you specify table padding in CSS? ( table, not cell padding )
- Two Divs next to each other, that then stack with responsive change
- SVG drop shadow using css3
- Force table column widths to always be fixed regardless of contents
- Change the color of glyphicons to blue in some- but not at all places using Bootstrap 2
- Using Numbers With Font Awesome
- Change cursor to hand when mouse goes over a row in table
- CSS table td width – fixed, not flexible
- Is it possible to use css to shrink text to automatically fit the size of the div
- HTML5 Canvas Rotate Image
- How can I align text directly beneath an image?
- how do I get the bullet points of a
- to center with the text?
- jQuery find element by data attribute value
- CSS: Can a div “float:middle” rather than “float:left;” with margin-left?
- WordPress footer menu floating with height of footer
- How put links in wordpress dynamic sidebar?