I'm just learning to typeset, this is my first attempt.

What is the best way to make out the background?

Now everything looks like this for me:

alt text

#header_top { font-family: "open Sans", "Open Sans Light", sans-serif; font-size: 14px; background-image:url(img/header_top.png); background-repeat:no-repeat; margin:0px; } #header_top div{ display: inline-block; margin-right:50px; margin-left:50px; } #header_bottom { background-image:url(img/header_bottom.png); background-repeat:no-repeat; } 

How to make the header background be across the entire width of the browser window and stretch the window appropriately when resized?

  • @ Daria Baklanova, If you are given a comprehensive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

2 answers 2

The background, like you, can not be stretched, because there are no duplicate elements in it and it is made with a picture. You can use a much larger image (for example, a width of 1440px) and crop it or adjust it to its width on smaller screens. You can select a picture with the same left and right edges and make it the entire header space.

  • Well, I would not be so categorical. On the left of the cap, the color seems to be monotonous, so you can press the picture to the right and adjust the background color to the picture. Then on the left, if the picture ends, just a colorful background will be visible, and you will not find the border of the picture at the same time - BOPOH

If the background image is small, try adjusting it with background-size