Body width is not as wide as content width

when the width of the content in body exceeds the width of body due to the setting of left,margin thank you, and the width of body is not as wide as the width of the content, how to make the width of body equal to the width of the complete content?

Mar.06,2021

you must have elements that deviate from the standard stream, otherwise the body width will automatically prop up. BFC learn about


wrap a package element in body to make him form BFC


body add an overflow:hidden to try


clear:both


because the code is relatively long, and the streaming layout is also used, resulting in a bit of chaos in the whole layout. There is still no solution to the problem. It is realized in other ways to avoid this form. Js can also be used


seems to be unable to automatically open body

.
Menu