Here is one solution that may work for you:
First id's should be reserved for single uses. Your #p1 & #p2 would be better written as classes. To solve your problem you only need overflow:hidden;
on the highest level container, in this case the header. Also since you've given #p2
absolute position, you also need to give the header position:relative;
.
CSS:
header {
// existing styles
position: relative;
overflow: hidden;
}