但是现在div正在左边对齐!
网址:http://185.123.96.102/~kidsdrum/moneynest.co.uk/
HTML
<div > <div > <div ></div> <h1 >Aged 20-30 & frustrated with money?</h1> <div > <div ></div> <h2 >Take our free <b >Jumpstart Your Finances</b> class to<br /> quickly gain control over your finances</h2> <p > <br> <!-- Begin MailChimp Signup Form --><div ID="mc_embed_signup"><form action="//moneynest.us11.List-manage.com/subscribe/post?u=9ccf2d2219536b32eaae3c3d1&ID=299de51b4e" method="post" ID="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank" novalIDate> <div ID="mc_embed_signup_scroll"> <img src="http://185.123.96.102/~kIDsdrum/moneynest.co.uk/img/hand-drawn-arrow.png" ID="handarrow" alt="arrow"><input type="email" value="" name="EMAIL" ID="mce-EMAIL" placeholder="Enter your email address" required autofocus> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> <div aria-hIDden="true"><input type="text" name="b_9ccf2d2219536b32eaae3c3d1_299de51b4e" tabindex="-1" value=""></div> <div ><input type="submit" value="Start Class Now" name="subscribe" ID="mc-embedded-subscribe" ></div> </div></form></div><!--End mc_embed_signup--></div></div> </div></div>
CSS
.greenpromoBox {background-color: green; padding-top: 1px; margin-top:25px; wIDth: 70%; border-radius: 5px; text-align: center; }解决方法 您将宽度减小到70%然后需要margin-left和margin-right auto
.greenpromoBox { background-color: green; padding-top: 1px; margin-top:25px; margin-left: auto; margin-right: auto; wIDth: 70%; border-radius: 5px; text-align: center; }总结
以上是内存溢出为你收集整理的HTML – 改变了我的div的宽度,现在中心消失了全部内容,希望文章能够帮你解决HTML – 改变了我的div的宽度,现在中心消失了所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)