SyntaxFix
Write A Post
Hire A Developer
Questions
You can use box-sizing css property, it's crossbrowser(ie8+, and all real browsers) and pretty good solution for such cases:
box-sizing
#childDiv{ box-sizing: border-box; width: 100%; //or any percentage width you want padding: 50px; }
Fiddle