Home > Article > Web Front-end > How can I modify the DIV to be centered? ? ? ._html/css_WEB-ITnose
Is there anyone? ? ? Where do I need to modify the above things to make this DIV appear in the middle of the page? ? ?
Why is it necessary to float? Just remove float: left!
bacbf9e1ad7f40415ce1670e31edfee3dc6dce4a544fdca2df29d5ac0ea9906b...16b28748ea4df4d9c2150843fecfba68adca8a5fa06ffeafb062c2e3f274b930 Try
<!DOCTYPE html><html><head><style>* {margin:0px;padding:0px;}#page {margin-left:auto;margin-right:auto;}</style></head><body><div id="page">page</div></body></html>
Change the CSS style Change it to the following and it should be fine.
.Classpeng{ margin:0px auto; text-align:center; width:200px; height:100px;}
You on the 3rd floor are in trouble! As soon as you put it on, it will be effective.
But thank you all upstairs.