css - IE9 - unwanted padding inside div when inner div is absolute and outer div is relatively positioned -


i have been battling problem 6 hours on ie. there seems padding when use before tag position absolute.

css

.rteeditable{   background-color:green;   position: relative;   width: 200px;   height: 400px;   min-height: 400px; } .rteeditable p{   padding-left: 46px; }  .rteeditable:before{   position: absolute;    height: 100%;   width: 40px;   content:'';   background-color:red; } 

html

<div class="rteeditable" contenteditable="true"> <p> hello teast </p> </div> 

the code have written jsfiddle

here images better explanation.

google chrome

chrome

ie9

ie9

see https://jsfiddle.net/evouvj7v/

add

left: 0; right: 0; top: 0; bottom: 0; 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo