html, css

https://codepen.io/Nandha-Kumar-S-S/pen/ZEVyKxx i specified the width and height of body tag and when background color is applied to body tag it doesnt fit in the specified width but applies to whole screen but when fitted within a div tag and applied it works am i using body tag design in css wrongly
2 Replies
b1mind
b1mind•9mo ago
Yea I would avoid putting any sizes on body period. You want it to always wrap around the content. make a .wrapper class or something if you need.
GATTS KUMAR
GATTS KUMAR•9mo ago
i am beginner cant understand can you say detaily