Hi, I’m pretty new to coding and I’m working my way through the freeCodeCamp front end projects at the moment.
I’m making a portfolio page for a photographer and I’m having trouble with positioning a background image on the home page.
They want the image to fill the screen, for it not to resize if the window is resized, and for it to be centered in the browser window no matter the device’s screen size.
Currently I have the image set as the background of the body, like so:
But while this gives me an image that is the right size, it is not centered in the window - I want it to be cropped at the top and the bottom, with no scrolling enabled in the window.
Can anybody suggest a way for me to do this?