0
I want to define as the home page of my site an image that occupies the entire background, as follows:
<style type=text/css>
body {
background-image: url("imagem.jpg");
background-repeat: no-repeat;
-moz-background-size: 100% 100%;
-webkit-background-size: 100% 100%;
background-size: 100% 100%;}
}
</style>
But I want the same fixed on the background (in place of the white background, which appears normally) and on top of this image I want to put the rest, which will compose the screen. Footer, Top, login area, registration... Everything positioned on this image, which will be just the background. Can I do this with div? How do I proceed? If anyone can guide me or help me with example, I thank you.
This code you posted gave some trouble?
– Alexandre Borela
No, it just uploaded the image as the background occupying the entire screen. Now how do I keep this image (make it clearer) and overlay content on that background?
– Developer1903
So, if the image was applied to the body, anything inside it (which would already be the full page) will already overlap it, post a screenshot of your intention to understand easier.
– Alexandre Borela
If what you’re trying to do is keep the image fixed relative to the scrolling of the page, you can use the property
background-attachment:fixed;
– Eduardo Lelis