besides text? +3 html css pistacch...">

HTML / CSS Image Buttons

Is there a way to add an image to the regular <input type = "button" />besides text?

+3
source share
6 answers

We can have a css button for the button.

 

background: url (images / blue.png); 

+1
source

Yes - you have to set the background image on the button in CSS. My preferred method is to use a button tag, for example.

<button type="submit">text</button>

You can put any html you want in the tag and create it.

+3
source

"image"

<input type="image" src="/path/to/image.png" value="Click here" size="32,32" border="0" />
+1

HTML ( )

<BUTTON type="submit" src="/images/Button.png" value=""> 

CSS, myBtn

<BUTTON type="submit" class="myBtn" value=""> 

myBtn

.myBtn{ 
background: url(/images/Button.PNG) no-repeat; 
cursor: pointer; 
width: 140px; 
height: 80px; 
border: none; 
} 
+1
<input type="button" style="background-image:url(flower.jpg)" value="Click">

HTML.

+1

Button image or button image?

AS Image Button:

<input type="image" src="/images/myImage.png" alt="An image as a button"/>

The image inside the button .... I don’t think.

0
source

Source: https://habr.com/ru/post/1735382/


All Articles