gpt4 book ai didi

html - 自动对齐不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 23:35:49 25 4
gpt4 key购买 nike

我正在编写一个 PHP 页面,但是当我调整浏览器大小时,div 元素没有移动。即。

       <html>
<head>
<style>
body{background-color: #CDD3FA}

#paragraph {
margin-right: 300px;
margin-left: 300px;
width: 720px;
border: 1px solid #a1a1a1;
padding: 10px 40px;
background: #E0E2EE;
border-radius: 25px;
text-align: justify;

}
</style>

</head>
<body>
<div id="paragraph">
<p><strong> Note: Application for TAC approval is similar, but not identical, to Section II of the Institutional Ethics Committee Application Form. As far as possible, the total length of the TAC application, with the responses, should not exceed six pages or 2500 words. Use of simple language is preferred. Ensure that full forms or definitions of all abbreviations and acronyms are given. The investigator should ensure that sufficient information is provided to show that the study is scientifically sound and technically feasible, and that the expected outcome of the study is clearly defined. If the sub-sections A to H are not sufficient to provide these aspects of the research, additional details of the study should be provided in sub-section I.</strong></p>
</div>

</body>
</html>

如何在调整页面大小时修复居中问题?

最佳答案

试试这个(更新代码和 fiddle )

 #paragraph {
margin: 0 auto;
width: 300px;
border: 1px solid #a1a1a1;
padding: 10px 40px;
background: #E0E2EE;
border-radius: 25px;
text-align: justify;

}

Working Fiddle

关于html - 自动对齐不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24154463/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com