I am trying to add an image inside button and want to align it center for that I have given background-position as a center but it's still aligning right. Can anyone suggest to me how should I align it in the center?
demo.html
<html lang="en">
<head>
<link rel="stylesheet" href="demo.css">
<title>Document</title>
</head>
<body>
<button class="closeIconRegion"> <span class="closeIconStyle"> </span></button>
</body>
</html>
demo.css
.closeIconRegion {
position: relative;
overflow: hidden;
width: 30px;
height: 30px;
background: Orange;
}
.closeIconStyle {
cursor: pointer;
display: block;
height: 25px !important;
width: 25px !important;
background-position: left;
background-image: url(/images/closebtn_white.png);
float: left;
}
output::