0
How do i make my header background image fit to screen?
My webpage is responsive but how do I make any picture I add to it take the size of the screen?
4 odpowiedzi
0
Use css to make it responsive. Include inside div tag and then make the desired changes in that div.
Make sure try on everychange.
0
height: 100vh;
try this in your header tag. You can adjust the vh unit as you like. 100vh is 100% of the viewport or screen size.
0
Thanks Hassan but what I need is the maximum width
0
Iwasam Enya I don't fully understand your question. It'll be helpful if you posted your code.
background: url('image.jpg') no-repeat center center/cover;
Did you add your background property like this?
Also, did you reset your margin and padding like this:
* { margin: 0; padding: 0 }
btw I hope you didn't forget to include
<meta name="viewport" content="width=device-width, initial-scale=1.0">
above your css inside head tag.