I have 2 divs, an outer div which is a parent and a child div. The outer div is position relatives with padding 20px for left and right while the child is position absolute with 100% widthg. How can I force the child which is position absolute to be within the parent, ie respecting the padding 20px (inside parent and within the 20px padding)
I've done the example here: http://www.bootply.com/nyGZzTVY8v
I've read about box-sizing but I still don't understand how to implement it correctly. Tried putting it on the box1 class and nothing happen, tried putting on the box2 class and nothing happen also.
thanks in advance.
Additional Note: It has to be responsive ie I do not know the size of the parent div thus the 100% for the child div.