HTML:替代

HTML:替代,第1张

概述我一直以为替换< center>标签与< div style =“text-align:center;”>会得到相同的结果.显然我错了. 这是我的HTML的一部分: (您也可以在我为此问题创建的页面中看到它的运行情况: http://www.moviez.4pu.com/ErrorPageSO.aspx <div style="margin: 0 auto; background-color:re 我一直以为替换< center>标签与< div style =“text-align:center;”>会得到相同的结果.显然我错了.

这是我的HTML的一部分:
(您也可以在我为此问题创建的页面中看到它的运行情况:
http://www.moviez.4pu.com/ErrorPageSO.aspx

<div >    <span >    <h1>Oops... We're sorry.</h1>    <h3>You've just encountered an unkNown error. <br /></h3>    This site is a work-in-progress,we have already been informed of the error and will do our best to fix it. <br />    We would be thankful if you Could contact us through the appropriate button and elaborate on what caused this error to appear.<br />    <br />    <h3>    You can go back to the <a  href="Default.aspx">Home page</a> and continue using MovIEz.NET.           </h3>    </span><span ><img src="Resources/Images/404.jpg" /></span></div>

我想做两件事:

>摆脱< center>标记,同时将div保持在页面的中心.
>确保外部div背景颜色和边框影响内跨距.

更新:
目标1完成.
目标#2的时间.

解决方法 使用保证金:0自动;封闭的< div>
<div >  <span >  <h1>Oops... We're sorry.</h1>  <h3>You've just encountered an unkNown error. <br /></h3>  This site is a work-in-progress,we have already been informed of the error and will do our best to fix it. <br />  We would be thankful if you Could contact us through the appropriate button and elaborate on what caused this error to appear.<br />  <br />  <h3>  You can go back to the <a  href="Default.aspx">Home page</a> and continue using MovIEz.NET.             </h3>  </span><span ><img src="Resources/Images/404.jpg" /></span></div>

See it in action.

参考:CSS: centering things

总结

以上是内存溢出为你收集整理的HTML:替代全部内容,希望文章能够帮你解决HTML:替代所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1138140.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存