i tried multiple edits but my background image is cutting up in footer code is below plz help. i
tried qrapping up image in css and using footer as separate class i used   as i needed space
in my text of footer
`HTML code for footer section
<!-- Footer Section -->
<footer>
<div class="footer-top-line"></div>
<p>© 2023 • All Rights
Reserved •
Anmol Talwar</p>
</body>
</html>`
THIS IS HTML CODE WHERE I ALSO ADDED LINE ON TOP OF FOOTER.
# CSS code for footer section
` .footer {
background-image: url(‘C:/Users/anmol/Desktop/test/aboutme-background.jpg’);
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
color: white;
text-align: center;
font-weight: bolder;
padding: 10px 0;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
z-index: -1;
}
.footer a {
color: white;
text-decoration: underline;
font-weight: bolder;
}`
.footer-top-line {
border-top: 1px solid white;
margin-bottom: 10px;
}
PLZ REFER TO PIC I ADDED TO ADDRESS ISSUE I SAID
i tried changing height of footer, then adding bacground image url in footer, it is not working up and halfway of footer image cuts off if i add anything to body image still extends normal but cuts off in footer
your text
2
Answers
You should use width and height property along with your code.
Example:
You can fix it by following these steps:
Make sure your image path is correct. Or, if your image is in the same folder as
your CSS file, you can use background-image: url(‘img-src.jpg’);.
Background Size:
You are using background-size: cover; which can sometimes cause
an image to be cropped in order to cover the entire container.
You might want to
try different values for background-size to see if that resolves the issue.
For example, you could use background-size: contain; which will ensure the image
fits within the container without being cropped, potentially making the whole
image visible.
change your css in footer.css file as below.
Once you try these steps, This should solve the issue.