Image not picking feature of the div in which it is inserted

2

I have a header tag, where is my menu, this header tag has 80% width of the screen and is fixed at the top. I have just below the menu an image, which I want to take 100% of the screen, but it is inside the same header tag. Is this image not catching the width of the header tag, and instead is with 100% of the screen, but still be fixed at the top along with the header?

    
asked by anonymous 26.11.2015 / 12:05

1 answer

1

Tem.

Set the image to:

position: fixed;
width: 100%;

left: 0; 
right: 0;
margin: auto;

margin-top: 100px; /* Aqui é o Tamanho do Header em Px */

The margin-top must be height of <header> .

    
26.11.2015 / 12:07