I would like to set the form tag div. Everything works fine, but when I set the tag imginside this form, it does not display well.
My CSS code is:
#chevron{
width: 350px;
height: 100px;
background: #337AB7;
border-radius: 10px 10px 0 0;
position: relative;
}
#chevron:before {
content: '';
position: absolute;
top: 20px;
left: 0;
height: 100%;
width: 51%;
background: #337AB7;
-webkit-transform: skew(0deg, 6deg); -moz-transform: skew(0deg, 6deg);
-ms-transform: skew(0deg, 6deg);
-o-transform: skew(0deg, 6deg);
transform: skew(0deg, 6deg); }
#chevron:after {
content: '';
position: absolute;
top: 20px;
right: 0;
height: 100%;
width: 50%;
background: #337AB7;
-webkit-transform: skew(0deg, -6deg); -moz-transform: skew(0deg, -6deg); -ms-transform: skew(0deg, -6deg); -o-transform: skew(0deg, -6deg); transform: skew(0deg, -6deg); }
My html file:
<div id="chevron">
<img src="http://i.stack.imgur.com/HtYUn.jpg" style="width:120px;height:120px"/>
</div>
I want to set my form ( chevron) as a background, and the inner elements should be above it.
http://jsfiddle.net/45tyb219/2/
source
share