so I have a submit button with this code:
<form method="post">
<input name="submit" type="submit" class="icon" value=" "/>
</form>
an in the CSS I have:
.icon{
background-color:transparent;
background-image:url(http://www.lcda.fr/pneu-expo/images/drapeau_rond_gb-on.png);
height:20px;
width: 20px;
background-position:center;
border:none;
cursor:pointer;
background-size: 100%;
}
But the problem is that the image ( that have h:40px and w:40px) does not shrink to fit the 20px button... Do you guys have any solution for this?? (I rather not use javascript if possible)
EDIT: Currently working. I just delete history, cash and it works... ty
try this : -
background-size:20px 20px;
Use an image submit button instead, and shrink the element to the desired dimensions using CSS.
<input name="submit" type="image" class="icon"
style="width: 20px; height: 20px"
src="http://www.lcda.fr/pneu-expo/images/drapeau_rond_gb-on.png"
alt="Send" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With