Styling CSS input text without a parent div
Hello everyone, I am looking to remove the <div id="input_container">
from the code below. Is it possible to achieve the same result without that surrounding div?
Check out the jsfiddle: http://jsfiddle.net/930yrzqa/6/
Here is what I want:
<input type="text" class="input-test">
<img src="https://cdn4.iconfinder.com/data/icons/36-slim-icons/87/calender.png" id="input_img">
#input_container {
position: relative;
padding: 0 0 0 20px;
margin: 0 20px;
direction: rtl;
width: 200px;
}
#input_img {
position: absolute;
bottom: 2px;
right: 5px;
width: 24px;
height: 24px;
}
.input-test {
display: block;
margin: 0 0 0 auto;
width: 169px;
height: 34px;
box-sizing: border-box;
border: 2px solid green;
border-radius: 4px;
font-size: 16px;
background-color: white;
color: $black;
//background-image: url(http://i.imgur.com/2LGbUV2.png);
background-position: 130px 5px;
background-repeat: no-repeat;
padding: 12px 20px 12px 10px;
height: 20px;
margin: 0;
padding-right: 30px;
width: 100%;
}
<div id="input_container">
<input type="text" class="input-test">
<img src="https://cdn4.iconfinder.com/data/icons/36-slim-icons/87/calender.png" id="input_img">
</div>