New course! Every coder should learn Generative AI!
Try a free lesson+ 10
If i apply footer background color it doesn’t work. background color apply after <header> tag. Why?
In this code, when i apply footer background color it not work and property work after header tag. If you see on inspect element the p tag show hole section and footer area. https://code.sololearn.com/W7Irz7DZbXGO/?ref=app
4 Answers
+ 8
thank you Jamal Abdullhamid.
All closing tag is good. After Inspect element on my pc, footer element defines immediately after header and it take all area of section and if i change 'footer p' background color it apply all of p that in section and footer.
+ 8
Thank you Abhay.
After Inspect element on my pc, footer element defines immediately after header and it take all area of section and if i change 'footer p' background color it apply all of p that in section and footer.
+ 4
footer works fine it even changes the backgroundcolor of section for some weird reason and the section background color doesn't works !
+ 4
Hello friend
Your problem is not in the css file as you pointed.
The problem is with your html structure, you forgot a closing </div> after the section part and there is a problem unfortunately i cant find because its easier to debug in a pc browser.
I suggest to you to open your html file on a pc browser so you can inspect it and follow your openings and closings, as your mouse over an opening it should highlight its own closing.
Btw nice structure and happy coding!.