width: 100% of an absolute positioned element is bigger than the parent
07:25 10 Mar 2018

I have a div with unknown width and height, this div is one of the children of a bigger div.

#myDiv {
    /* Blah blah blah */
}

#inner {
    position: absolute;
    width: 100%;
    height: 100%;
}

But the problem is that the #inner div doesn't fit properly, it's way bigger than its parent #myDiv while its width and height are set to 100%.

What am I doing wrong?

html css