I am currently working on a website for a friend and I am facing an issue with the header section. The header is a div that contains two images inside divs, as well as the company name and slogan in separate divs.
The main purpose of this header div is to group all the header content together for easier positioning and to allow for a background image to be applied.
However, I am encountering a problem where the background image of the header does not completely fill the entire background area of the content within it. It only fills up to the padding specified on the header div.
In theory, I believe that a container div should have the same size as the combined sizes of its child divs. This would mean that setting a background image for the parent div should result in a background that covers all the child divs as well. Unfortunately, this is not happening in practice.
Can someone please help me understand what I am overlooking? How can I make sure that the image acts as a background for the entire header? I have included the relevant (generic) code here: http://codepen.io/deadwanderer/pen/LnGKC/
If you take a look at the code, you'll notice that the borders of the header div create more of a line at the top of the content rather than surrounding it like a box.
Thank you in advance for any assistance or advice!