JSFiddle - React, Tailwind, and code Playground
by exex zian
HTML
<body>
<div class="input-container">
<input type="text" class="cross" /> <a class="icon"></a>
</div>
<hr>
<button>submit</button>
</body>
CSS
.cross {
height: 100%;
width: 100%;
}
.input-container {
position: relative;
height: 20px;
width: 150px;
}
.icon {
position: absolute;
top: 10%;
right: 0;
height: 20px;
width: 20px;
background-image:url('http://s20.postimg.org/6125okgwt/rough_Close.png');
background-repeat:no-repeat;
background-position:right center;
background-size:70% 90%;
z-index: 1;
padding-right: 6%;
cursor: pointer;
}
JavaScript
$(".icon").click(function(){
$(this).attr("href", "Your URL");
});