css - DIV :after - add content after DIV -
i'm designing simple website , have question. want after <div> tags class="a" have image separator on bottom, right after <div> (refer image, section in red). i'm using css operator :after create content:
.a:after { content: ""; display: block; background: url(separador.png) center center no-repeat; height: 29px; } the problem image separator not displaying after <div>, right after content of <div>, in case have paragraph <p>. how code image separator appears after <div class="a">, regardless of height , content of div a?
position <div> absolutely @ bottom , don't forget give div.a position: relative - http://jsfiddle.net/ttamx/
.a { position: relative; margin: 40px 0; height: 40px; width: 200px; background: #eee; } .a:after { content: " "; display: block; background: #c00; height: 29px; width: 100%; position: absolute; bottom: -29px; } 
Comments
Post a Comment